def _process( self ): if not self._cancel: acco = self._conf.getRegistrationForm().getAccommodationForm() accoType = AccommodationType(self._conf.getRegistrationForm()) accoType.setCaption(self._caption) #accoType.setId(self._caption) acco.addAccommodationType(accoType) self._redirect(urlHandlers.UHConfModifRegFormAccommodation.getURL(self._conf))
def _process(self): if not self._cancel: acco = self._conf.getRegistrationForm().getAccommodationForm() accoType = AccommodationType(self._conf.getRegistrationForm()) accoType.setCaption(self._caption) #accoType.setId(self._caption) acco.addAccommodationType(accoType) self._redirect( urlHandlers.UHConfModifRegFormAccommodation.getURL(self._conf))
def _setItems(self): for item in self._items: accoType = None if item.get('id') == 'isNew': accoType = AccommodationType(self._regForm) self._section.addAccommodationType(accoType) else: accoType = self._section.getAccommodationTypeById(item.get('id')) if 'remove' in item: self._section.removeAccommodationType(accoType) else: accoType.setValues(item)
def _setItems(self): for item in self._items: accoType = None if item.get('id') == 'isNew': accoType = AccommodationType(self._regForm) self._section.addAccommodationType(accoType) else: accoType = self._section.getAccommodationTypeById( item.get('id')) if 'remove' in item: self._section.removeAccommodationType(accoType) else: accoType.setValues(item)