Increase maximum question options

main
Bob Mottram 2019-11-26 12:17:52 +00:00
parent 7823206528
commit 4a2e671149
2 changed files with 3 additions and 3 deletions

View File

@ -3573,7 +3573,7 @@ class PubServer(BaseHTTPRequestHandler):
return -1 return -1
questionStr=fields['message'] questionStr=fields['message']
qOptions=[] qOptions=[]
for questionCtr in range(6): for questionCtr in range(8):
if fields.get('questionOption'+str(questionCtr)): if fields.get('questionOption'+str(questionCtr)):
qOptions.append(fields['questionOption'+str(questionCtr)]) qOptions.append(fields['questionOption'+str(questionCtr)])
if not qOptions: if not qOptions:

View File

@ -980,8 +980,8 @@ def htmlNewPost(translate: {},baseDir: str, \
placeholderMessage=translate['Enter your question']+'...' placeholderMessage=translate['Enter your question']+'...'
endpoint='newquestion' endpoint='newquestion'
extraFields='<div class="container">' extraFields='<div class="container">'
for questionCtr in range(6): for questionCtr in range(8):
extraFields+=' <input type="text" class="questionOption" placeholder="'+str(questionCtr)+'" name="questionOption'+str(questionCtr)+'">' extraFields+=' <input type="text" class="questionOption" placeholder="'+str(questionCtr+1)+'" name="questionOption'+str(questionCtr)+'">'
extraFields+=' <label class="labels">'+translate['Duration of listing in days']+':</label> <input type="number" name="duration" min="1" max="365" step="1" value="14">' extraFields+=' <label class="labels">'+translate['Duration of listing in days']+':</label> <input type="number" name="duration" min="1" max="365" step="1" value="14">'
extraFields+='</div>' extraFields+='</div>'
if path.endswith('/newshare'): if path.endswith('/newshare'):