generating select options in python
This commit is contained in:
@@ -16,6 +16,19 @@ def updateHtmlFile(symptoms, vaccines, htmlFile, defaultSelectVaccineOptionText
|
||||
htmlFile = htmlFile,
|
||||
selectElementId = 'vaccineSelect')
|
||||
|
||||
def updateHtmlFile4SymptomsCausedByCOVIDLots(symptoms, batches, htmlFile):
|
||||
symptomOptions = getSymptomOptions(symptoms)
|
||||
for selectElementId in ['symptomSelect', 'symptomSelectX', 'symptomSelectY']:
|
||||
_saveOptions(
|
||||
options = symptomOptions,
|
||||
htmlFile = htmlFile,
|
||||
selectElementId = selectElementId)
|
||||
|
||||
_saveOptions(
|
||||
options = getVaccineOptions(batches, 'Select Batch'),
|
||||
htmlFile = htmlFile,
|
||||
selectElementId = 'vaccineSelect')
|
||||
|
||||
def _saveOptions(options, htmlFile, selectElementId):
|
||||
HtmlTransformerUtil().applySoupTransformerToFile(
|
||||
file=htmlFile,
|
||||
|
||||
Reference in New Issue
Block a user