- Timestamp:
- 26 Jul 2012, 04:35:28 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/applicants/browser.py
r9049 r9050 63 63 return _('Download application slip') 64 64 65 class NigeriaApplicantDisplayFormPage(ApplicantDisplayFormPage): 66 """A display view for applicant data. 67 """ 68 69 @property 70 def form_fields(self): 71 target = getattr(self.context.__parent__, 'prefix', None) 72 if target is not None and target.startswith('pg'): 73 form_fields = grok.AutoFields(INigeriaPGApplicant) 74 for field in PG_OMIT_DISPLAY_FIELDS: 75 form_fields = form_fields.omit(field) 76 elif target is not None and target.startswith('putme'): 77 form_fields = grok.AutoFields(INigeriaUGApplicant) 78 for field in PUTME_OMIT_DISPLAY_FIELDS: 79 form_fields = form_fields.omit(field) 80 else: 81 form_fields = grok.AutoFields(INigeriaUGApplicant) 82 for field in UG_OMIT_DISPLAY_FIELDS: 83 form_fields = form_fields.omit(field) 84 return form_fields 65 85 66 86 class NigeriaPDFApplicationSlip(PDFApplicationSlip): … … 99 119 if not getattr(self.context, 'student_id'): 100 120 form_fields = form_fields.omit('student_id') 101 return form_fields102 103 class NigeriaApplicantDisplayFormPage(ApplicantDisplayFormPage):104 """A display view for applicant data.105 """106 107 @property108 def form_fields(self):109 target = getattr(self.context.__parent__, 'prefix', None)110 if target is not None and target.startswith('pg'):111 form_fields = grok.AutoFields(INigeriaPGApplicant)112 for field in PG_OMIT_DISPLAY_FIELDS:113 form_fields = form_fields.omit(field)114 elif target is not None and target.startswith('putme'):115 form_fields = grok.AutoFields(INigeriaUGApplicant)116 for field in PUTME_OMIT_DISPLAY_FIELDS:117 form_fields = form_fields.omit(field)118 else:119 form_fields = grok.AutoFields(INigeriaUGApplicant)120 for field in UG_OMIT_DISPLAY_FIELDS:121 form_fields = form_fields.omit(field)122 121 return form_fields 123 122
Note: See TracChangeset for help on using the changeset viewer.