- Timestamp:
- 26 Jul 2012, 06:23:18 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/applicants/browser.py
r9050 r9054 22 22 from zope.i18n import translate 23 23 from waeup.kofa.widgets.datewidget import FriendlyDatetimeDisplayWidget 24 from zope.formlib.textwidgets import BytesDisplayWidget 24 25 from waeup.kofa.students.interfaces import IStudentsUtils 25 26 from waeup.kofa.applicants.interfaces import ( … … 39 40 INigeriaPGApplicantEdit, INigeriaUGApplicantEdit, 40 41 INigeriaApplicantOnlinePayment,IPUTMEApplicantEdit, 41 UG_OMIT_DISPLAY_FIELDS, PUTME_OMIT_DISPLAY_FIELDS, PG_OMIT_DISPLAY_FIELDS, 42 UG_OMIT_PDF_FIELDS, PUTME_OMIT_PDF_FIELDS, PG_OMIT_PDF_FIELDS, 43 UG_OMIT_MANAGE_FIELDS, PUTME_OMIT_MANAGE_FIELDS, PG_OMIT_MANAGE_FIELDS, 44 UG_OMIT_EDIT_FIELDS, PG_OMIT_EDIT_FIELDS, PUTME_OMIT_EDIT_FIELDS, 45 PUTME_OMIT_RESULT_SLIP_FIELDS) 42 UG_OMIT_DISPLAY_FIELDS, 43 UG_OMIT_PDF_FIELDS, 44 UG_OMIT_MANAGE_FIELDS, 45 UG_OMIT_EDIT_FIELDS, 46 PG_OMIT_DISPLAY_FIELDS, 47 PG_OMIT_PDF_FIELDS, 48 PG_OMIT_MANAGE_FIELDS, 49 PG_OMIT_EDIT_FIELDS, 50 PUTME_OMIT_DISPLAY_FIELDS, 51 PUTME_OMIT_PDF_FIELDS, 52 PUTME_OMIT_MANAGE_FIELDS, 53 PUTME_OMIT_EDIT_FIELDS, 54 PUTME_OMIT_RESULT_SLIP_FIELDS, 55 PUDE_OMIT_DISPLAY_FIELDS, 56 PUDE_OMIT_PDF_FIELDS, 57 PUDE_OMIT_MANAGE_FIELDS, 58 PUDE_OMIT_EDIT_FIELDS, 59 PUDE_OMIT_RESULT_SLIP_FIELDS, 60 ) 46 61 from kofacustom.nigeria.interfaces import MessageFactory as _ 47 62 … … 78 93 for field in PUTME_OMIT_DISPLAY_FIELDS: 79 94 form_fields = form_fields.omit(field) 95 elif target is not None and target.startswith('pude'): 96 form_fields = grok.AutoFields(INigeriaUGApplicant) 97 for field in PUDE_OMIT_DISPLAY_FIELDS: 98 form_fields = form_fields.omit(field) 80 99 else: 81 100 form_fields = grok.AutoFields(INigeriaUGApplicant) 82 101 for field in UG_OMIT_DISPLAY_FIELDS: 83 102 form_fields = form_fields.omit(field) 103 form_fields['perm_address'].custom_widget = BytesDisplayWidget 104 form_fields['notice'].custom_widget = BytesDisplayWidget 84 105 return form_fields 85 106 … … 113 134 for field in PUTME_OMIT_PDF_FIELDS: 114 135 form_fields = form_fields.omit(field) 136 elif target is not None and target.startswith('pude'): 137 form_fields = grok.AutoFields(INigeriaUGApplicant) 138 if self._reduced_slip(): 139 for field in PUDE_OMIT_RESULT_SLIP_FIELDS: 140 form_fields = form_fields.omit(field) 141 else: 142 for field in PUDE_OMIT_PDF_FIELDS: 143 form_fields = form_fields.omit(field) 115 144 else: 116 145 form_fields = grok.AutoFields(INigeriaUGApplicant) … … 136 165 for field in PUTME_OMIT_MANAGE_FIELDS: 137 166 form_fields = form_fields.omit(field) 167 elif target is not None and target.startswith('pude'): 168 form_fields = grok.AutoFields(INigeriaUGApplicant) 169 for field in PUDE_OMIT_MANAGE_FIELDS: 170 form_fields = form_fields.omit(field) 138 171 else: 139 172 form_fields = grok.AutoFields(INigeriaUGApplicant) … … 158 191 form_fields = grok.AutoFields(IPUTMEApplicantEdit) 159 192 for field in PUTME_OMIT_EDIT_FIELDS: 193 form_fields = form_fields.omit(field) 194 elif target is not None and target.startswith('pude'): 195 form_fields = grok.AutoFields(INigeriaUGApplicant) 196 for field in PUDE_OMIT_EDIT_FIELDS: 160 197 form_fields = form_fields.omit(field) 161 198 else:
Note: See TracChangeset for help on using the changeset viewer.