Changeset 8187 for main/waeup.uniben
- Timestamp:
- 17 Apr 2012, 06:58:31 (13 years ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben
- Files:
-
- 3 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 -
main/waeup.uniben/trunk/src/waeup/uniben/browser/pages.py
r8080 r8187 24 24 from waeup.kofa.browser.pages import ( 25 25 UserEditFormPage, UserManageFormPage, AddUserFormPage) 26 from waeup.uniben.widgets.phonewidget import PhoneWidget27 26 28 27 class SessionConfigurationAddFormPage(SessionConfigurationAddFormPage): … … 35 34 """ 36 35 form_fields = grok.AutoFields(ISessionConfiguration) 37 38 class AddUserFormPage(AddUserFormPage):39 """Add a user account.40 """41 form_fields = grok.AutoFields(IUserAccount)42 form_fields['phone'].custom_widget = PhoneWidget43 44 class UserManageFormPage(UserManageFormPage):45 """Manage a user account.46 """47 form_fields = grok.AutoFields(IUserAccount).omit('name')48 form_fields['phone'].custom_widget = PhoneWidget49 50 class UserEditFormPage(UserEditFormPage):51 """Edit a user account by user52 """53 form_fields = grok.AutoFields(IUserAccount).omit(54 'name', 'description', 'roles')55 form_fields['phone'].custom_widget = PhoneWidget -
main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py
r8184 r8187 32 32 ) 33 33 from waeup.uniben.interfaces import MessageFactory as _ 34 from waeup.uniben.widgets.phonewidget import PhoneWidget35 34 36 35 class RequestCallbackActionButton(RequestCallbackActionButton): … … 51 50 """ 52 51 form_fields = grok.AutoFields(IStudentBase).omit('student_id') 53 form_fields['phone'].custom_widget = PhoneWidget54 52 55 53 class StudentBaseEditFormPage(StudentBaseEditFormPage): … … 58 56 form_fields = grok.AutoFields(IStudentBase).select( 59 57 'email', 'phone') 60 form_fields['phone'].custom_widget = PhoneWidget61 58 62 59
Note: See TracChangeset for help on using the changeset viewer.