- Timestamp:
- 23 Jul 2022, 08:08:45 (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.edocons/trunk/src/kofacustom/edocons/applicants/browser.py
r16853 r17029 54 54 ICustomPGApplicant, ICustomUGApplicant, ICustomApplicant, 55 55 ICustomPGApplicantEdit, ICustomUGApplicantEdit, 56 ICustomApplicantOnlinePayment, 56 ICustomApplicantOnlinePayment, ITranscriptApplicant, 57 57 ) 58 58 from kofacustom.nigeria.interfaces import MessageFactory as _ … … 94 94 'aggregate') 95 95 96 TSC_OMIT_FIELDS = ('locked', 'suspended', 97 ) 98 99 100 TSC_OMIT_EDIT_FIELDS = TSC_OMIT_FIELDS + ( 101 'applicant_id', 102 'proc_date', 103 ) 104 105 TSC_OMIT_MANAGE_FIELDS = TSC_OMIT_FIELDS + ( 106 'applicant_id',) 107 96 108 class CustomApplicantDisplayFormPage(NigeriaApplicantDisplayFormPage): 97 109 """A display view for applicant data. … … 104 116 for field in PG_OMIT_DISPLAY_FIELDS: 105 117 form_fields = form_fields.omit(field) 118 elif self.target is not None and self.target.startswith('tsc'): 119 form_fields = grok.AutoFields(ITranscriptApplicant) 120 for field in TSC_OMIT_FIELDS: 121 form_fields = form_fields.omit(field) 122 return form_fields 106 123 else: 107 124 form_fields = grok.AutoFields(ICustomUGApplicant) 108 125 for field in UG_OMIT_DISPLAY_FIELDS: 109 126 form_fields = form_fields.omit(field) 127 form_fields['notice'].custom_widget = BytesDisplayWidget 110 128 #form_fields['perm_address'].custom_widget = BytesDisplayWidget 111 form_fields['notice'].custom_widget = BytesDisplayWidget112 129 if not getattr(self.context, 'student_id'): 113 130 form_fields = form_fields.omit('student_id') … … 134 151 for field in PG_OMIT_PDF_FIELDS: 135 152 form_fields = form_fields.omit(field) 153 elif self.target is not None and self.target.startswith('tsc'): 154 form_fields = grok.AutoFields(ITranscriptApplicant) 155 for field in TSC_OMIT_FIELDS: 156 form_fields = form_fields.omit(field) 157 return form_fields 136 158 else: 137 159 form_fields = grok.AutoFields(ICustomUGApplicant) … … 164 186 for field in PG_OMIT_MANAGE_FIELDS: 165 187 form_fields = form_fields.omit(field) 188 elif self.target is not None and self.target.startswith('tsc'): 189 form_fields = grok.AutoFields(ITranscriptApplicant) 190 for field in TSC_OMIT_MANAGE_FIELDS: 191 form_fields = form_fields.omit(field) 192 return form_fields 166 193 else: 167 194 form_fields = grok.AutoFields(ICustomUGApplicant) … … 185 212 for field in PG_OMIT_EDIT_FIELDS: 186 213 form_fields = form_fields.omit(field) 214 elif self.target is not None and self.target.startswith('tsc'): 215 form_fields = grok.AutoFields(ITranscriptApplicant) 216 for field in TSC_OMIT_EDIT_FIELDS: 217 form_fields = form_fields.omit(field) 218 return form_fields 187 219 else: 188 220 form_fields = grok.AutoFields(ICustomUGApplicantEdit)
Note: See TracChangeset for help on using the changeset viewer.