Calendar checkbox

main
Bob Mottram 2020-07-03 21:47:26 +01:00
parent 8a5e1ea110
commit ce2d5d5d69
1 changed files with 22 additions and 0 deletions

View File

@ -185,6 +185,8 @@ from happening import removeCalendarEvent
from bookmarks import bookmark from bookmarks import bookmark
from bookmarks import undoBookmark from bookmarks import undoBookmark
from petnames import setPetName from petnames import setPetName
from followingCalendar import addPersonToCalendar
from followingCalendar import removePersonFromCalendar
import os import os
@ -7658,6 +7660,26 @@ class PubServer(BaseHTTPRequestHandler):
callingDomain) callingDomain)
self.server.POSTbusy = False self.server.POSTbusy = False
return 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)
self._redirect_headers(originPathStr + '/' +
self.server.defaultTimeline +
'?page='+str(pageNumber), cookie,
callingDomain)
self.server.POSTbusy = False
return
if '&submitBlock=' in optionsConfirmParams: if '&submitBlock=' in optionsConfirmParams:
if self.server.debug: if self.server.debug:
print('Adding block by ' + chooserNickname + print('Adding block by ' + chooserNickname +