- Timestamp:
- 17 Apr 2012, 06:58:31 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/applicants/browser.py
r8184 r8187 19 19 """ 20 20 import grok 21 from waeup.uniben.widgets.phonewidget import PhoneWidget22 21 from waeup.kofa.applicants.interfaces import ( 23 22 IApplicantRegisterUpdate, IApplicant, IApplicantEdit) … … 58 57 return form_fields 59 58 60 class ApplicantAddFormPage(ApplicantAddFormPage):61 """Add-form to add an applicant.62 """63 form_fields = grok.AutoFields(IApplicant).select(64 'firstname', 'middlename', 'lastname',65 'email', 'phone')66 form_fields['phone'].custom_widget = PhoneWidget67 68 59 class ApplicantDisplayFormPage(ApplicantDisplayFormPage): 69 60 """A display view for applicant data. … … 92 83 else: 93 84 form_fields = grok.AutoFields(IUGApplicant) 94 form_fields['phone'].custom_widget = PhoneWidget95 85 form_fields['student_id'].for_display = True 96 86 form_fields['applicant_id'].for_display = True … … 114 104 'screening_score' 115 105 ) 116 form_fields['phone'].custom_widget = PhoneWidget117 106 form_fields['applicant_id'].for_display = True 118 107 form_fields['reg_number'].for_display = True 119 108 return form_fields 120 121 class ApplicantRegistrationPage(ApplicantRegistrationPage):122 """Captcha'd registration page for applicants.123 """124 125 @property126 def form_fields(self):127 form_fields = None128 if self.context.mode == 'create':129 form_fields = grok.AutoFields(IApplicantEdit).select(130 'firstname', 'middlename', 'lastname', 'email', 'phone')131 form_fields['phone'].custom_widget = PhoneWidget132 elif self.context.mode == 'update':133 form_fields = grok.AutoFields(IApplicantRegisterUpdate).select(134 'firstname','reg_number','email')135 return form_fields
Note: See TracChangeset for help on using the changeset viewer.