Changeset 13055 for main/waeup.kofa/trunk/src/waeup/kofa/browser
- Timestamp:
- 16 Jun 2015, 11:28:07 (10 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/browser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/browser/layout.py
r11437 r13055 167 167 grok.baseclass() 168 168 169 class KofaForm(UtilityView,Form): 169 class KofaPage(UtilityView,Page): 170 """A megrok.layout page with additional methods. 171 """ 172 grok.baseclass() 173 174 class KofaFormPage(UtilityView,Form): 170 175 """A megrok.layout.Form with additional methods. 171 176 """ … … 173 178 174 179 def setUpWidgets(self,ignore_request=False): 175 super(KofaForm ,self).setUpWidgets(ignore_request)180 super(KofaFormPage,self).setUpWidgets(ignore_request) 176 181 # Width parameters will be overridden by Bootstrap 177 182 # so we have to set the css class 178 183 if self.widgets.get('body'): 179 184 self.widgets['body'].height = 10 180 181 class KofaPage(UtilityView,Page):182 """A megrok.layout page with additional methods.183 """184 grok.baseclass()185 185 186 186 class KofaDisplayFormPage(UtilityView,DisplayForm): -
main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py
r13010 r13055 44 44 from waeup.kofa.utils.helpers import html2dict 45 45 from waeup.kofa.browser.layout import ( 46 KofaPage, KofaForm , KofaEditFormPage, KofaAddFormPage,46 KofaPage, KofaFormPage, KofaEditFormPage, KofaAddFormPage, 47 47 KofaDisplayFormPage, NullValidator) 48 48 from waeup.kofa.browser.interfaces import ( … … 415 415 # 416 416 417 class ContactAdminForm (KofaForm):417 class ContactAdminFormPage(KofaFormPage): 418 418 grok.name('contactadmin') 419 419 #grok.context(IUniversity) … … 424 424 425 425 def update(self): 426 super(ContactAdminForm , self).update()426 super(ContactAdminFormPage, self).update() 427 427 self.form_fields.get('body').field.default = None 428 428 return … … 461 461 return 462 462 463 class EnquiriesForm (ContactAdminForm):463 class EnquiriesFormPage(ContactAdminFormPage): 464 464 """Captcha'd page to let anonymous send emails to the administrator. 465 465 """ … … 471 471 472 472 def update(self): 473 super(EnquiriesForm , self).update()473 super(EnquiriesFormPage, self).update() 474 474 # Handle captcha 475 475 self.captcha = getUtility(ICaptchaManager).getCaptcha() … … 843 843 return 844 844 845 class ContactUserForm (ContactAdminForm):845 class ContactUserFormPage(ContactAdminFormPage): 846 846 grok.name('contactuser') 847 847 grok.context(IUserAccount) … … 2431 2431 return 2432 2432 2433 class ChangePasswordRequestPage(KofaForm ):2433 class ChangePasswordRequestPage(KofaFormPage): 2434 2434 """Captcha'd page for all kind of users to request a password change. 2435 2435 """
Note: See TracChangeset for help on using the changeset viewer.