Dropdown for shared item category

main
Bob Mottram 2021-08-05 20:15:48 +01:00
parent 600c843149
commit 208f2f41bd
1 changed files with 11 additions and 2 deletions

View File

@ -361,8 +361,17 @@ def htmlNewPost(cssCache: {}, mediaInstance: bool, translate: {},
extraFields += '<br>' + \
editTextField(translate['Type of shared item. eg. hat'] + ':',
'itemType', '', '', True)
catStr = translate['Category of shared item. eg. clothing']
extraFields += editTextField(catStr + ':', 'category', '', '', True)
# catStr = translate['Category of shared item. eg. clothing']
themesDropdown += ' <select id="themeDropdown" ' + \
'name="category" class="theme">'
categoryTypes = ("food", "clothes", "tool")
for category in categoryTypes:
translatedCategory = "food"
if translate.get(category):
translatedCategory = translate[category]
themesDropdown += ' <option value="' + \
category + '">' + \
translatedCategory + '</option>'
extraFields += '<br>'
extraFields += \
editNumberField(translate['Duration of listing in days'],