Get checkbox state

main
Bob Mottram 2020-07-03 21:51:01 +01:00
parent ce2d5d5d69
commit dbd21902fa
1 changed files with 16 additions and 13 deletions

View File

@ -7661,19 +7661,22 @@ class PubServer(BaseHTTPRequestHandler):
self.server.POSTbusy = False
return
if '&submitOnCalendar=' in optionsConfirmParams:
if fields.get('onCalendar'):
if fields['onCalendar'] == 'on':
addPersonToCalendar(self.server.baseDir,
chooserNickname,
self.server.domain,
optionsNickname,
optionsDomainFull)
else:
removePersonFromCalendar(self.server.baseDir,
chooserNickname,
self.server.domain,
optionsNickname,
optionsDomainFull)
onCalendar = optionsConfirmParams.split('onCalendar=')[1]
if '&' in onCalendar:
onCalendar = onCalendar.split('&')[0]
print('onCalendar: ' + onCalendar)
if onCalendar == 'on':
addPersonToCalendar(self.server.baseDir,
chooserNickname,
self.server.domain,
optionsNickname,
optionsDomainFull)
else:
removePersonFromCalendar(self.server.baseDir,
chooserNickname,
self.server.domain,
optionsNickname,
optionsDomainFull)
self._redirect_headers(originPathStr + '/' +
self.server.defaultTimeline +
'?page='+str(pageNumber), cookie,