Changeset 13277
- Timestamp:
- 24 Sep 2015, 07:35:23 (9 years ago)
- Location:
- main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/applicants
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/applicants/browser.py
r13155 r13277 61 61 PUDE_OMIT_EDIT_FIELDS, 62 62 PUDE_OMIT_RESULT_SLIP_FIELDS, 63 PRE_OMIT_DISPLAY_FIELDS, 64 PRE_OMIT_PDF_FIELDS, 65 PRE_OMIT_MANAGE_FIELDS, 66 PRE_OMIT_EDIT_FIELDS, 63 67 ) 64 68 from kofacustom.nigeria.interfaces import MessageFactory as _ … … 90 94 for field in PG_OMIT_DISPLAY_FIELDS: 91 95 form_fields = form_fields.omit(field) 92 # Don't know what pre-degree studies are, seems to be pre-postgraduate. 93 # Many modifications are expected. Therefore, we need a dedicated 94 # elif statement (see also pages below) 95 elif self.target is not None and self.target.startswith('pre'): 96 form_fields = grok.AutoFields(INigeriaPGApplicant) 97 for field in PG_OMIT_DISPLAY_FIELDS: 96 elif self.target is not None and self.target.startswith('pre'): 97 form_fields = grok.AutoFields(INigeriaPGApplicant) 98 for field in PRE_OMIT_DISPLAY_FIELDS: 98 99 form_fields = form_fields.omit(field) 99 100 elif self.target is not None and self.target.startswith('cbt'): … … 144 145 elif self.target is not None and self.target.startswith('pre'): 145 146 form_fields = grok.AutoFields(INigeriaPGApplicant) 146 for field in P G_OMIT_PDF_FIELDS:147 for field in PRE_OMIT_PDF_FIELDS: 147 148 form_fields = form_fields.omit(field) 148 149 elif self.target is not None and self.target.startswith('cbt'): … … 192 193 elif self.target is not None and self.target.startswith('pre'): 193 194 form_fields = grok.AutoFields(INigeriaPGApplicant) 194 for field in P G_OMIT_MANAGE_FIELDS:195 for field in PRE_OMIT_MANAGE_FIELDS: 195 196 form_fields = form_fields.omit(field) 196 197 elif self.target is not None and self.target.startswith('cbt'): … … 226 227 elif self.target is not None and self.target.startswith('pre'): 227 228 form_fields = grok.AutoFields(INigeriaPGApplicantEdit) 228 for field in P G_OMIT_EDIT_FIELDS:229 for field in PRE_OMIT_EDIT_FIELDS: 229 230 form_fields = form_fields.omit(field) 230 231 elif self.target is not None and self.target.startswith('cbt'): -
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/applicants/interfaces.py
r13163 r13277 21 21 from zope import schema 22 22 from zope.component import getUtility 23 from zope.schema import getFields 23 24 from waeup.kofa.applicants.interfaces import ( 24 25 contextual_reg_num_source, … … 543 544 'locked'].order = IApplicantBaseData['suspended'].order 544 545 546 # PRE is used by Uniben 547 # med: "it is as named... PRE - DEGREE... much like a 1 year diploma programme" 548 PRE_OMIT_FIELDS = tuple([ 549 i for i in getFields(INigeriaPGApplicant).keys() 550 if i[:3] in ('hq_', 'emp', 'nys')]) 551 PRE_OMIT_DISPLAY_FIELDS = OMIT_DISPLAY_FIELDS + PRE_OMIT_FIELDS 552 PRE_OMIT_MANAGE_FIELDS = PG_OMIT_MANAGE_FIELDS + PRE_OMIT_FIELDS 553 PRE_OMIT_EDIT_FIELDS = set(PG_OMIT_EDIT_FIELDS + PRE_OMIT_FIELDS) 554 PRE_OMIT_PDF_FIELDS = PRE_OMIT_DISPLAY_FIELDS 555 PRE_OMIT_RESULT_SLIP_FIELDS = PRE_OMIT_DISPLAY_FIELDS 556 545 557 class INigeriaApplicant(INigeriaUGApplicant, INigeriaPGApplicant): 546 558 """An interface for both types of applicants.
Note: See TracChangeset for help on using the changeset viewer.