def _process( self ): if not self._cancel: se = self._conf.getRegistrationForm().getSocialEventForm() item = SocialEventItem(self._conf.getRegistrationForm()) item.setCaption(self._caption) #item.setId(self._caption) se.addSocialEvent(item) self._redirect(urlHandlers.UHConfModifRegFormSocialEvent.getURL(self._conf))
def _process(self): if not self._cancel: se = self._conf.getRegistrationForm().getSocialEventForm() item = SocialEventItem(self._conf.getRegistrationForm()) item.setCaption(self._caption) #item.setId(self._caption) se.addSocialEvent(item) self._redirect( urlHandlers.UHConfModifRegFormSocialEvent.getURL(self._conf))
def _setItems(self): for item in self._items: # Load or create social event socialEventItem = None if item.get('id') == 'isNew': socialEventItem = SocialEventItem(self._regForm) self._section.addSocialEvent(socialEventItem) else: socialEventItem = self._section.getSocialEventById(item.get('id')) # set or remove social event if 'remove' in item: self._section.removeSocialEvent(socialEventItem) else: socialEventItem.setValues(item)
def _setItems(self): for item in self._items: # Load or create social event socialEventItem = None if item.get('id') == 'isNew': socialEventItem = SocialEventItem(self._regForm) self._section.addSocialEvent(socialEventItem) else: socialEventItem = self._section.getSocialEventById( item.get('id')) # set or remove social event if 'remove' in item: self._section.removeSocialEvent(socialEventItem) else: socialEventItem.setValues(item)