- Timestamp:
- 10 Aug 2026, 15:45:02 (4 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.unidel/trunk/src/kofacustom/unidel/students/browser.py
r18276 r18295 44 44 NigeriaStudentBaseManageFormPage, 45 45 NigeriaStudentClearanceEditFormPage, 46 NigeriaStudentClearanceDisplayFormPage, 47 NigeriaStudentClearanceManageFormPage, 46 48 NigeriaOnlinePaymentAddFormPage, 47 49 NigeriaExportPDFPaymentSlip, … … 137 139 def manage_payments_allowed(self): 138 140 return checkPermission('waeup.manageStudent', self.context) 141 142 143 class CustomStudentClearanceDisplayFormPage(NigeriaStudentClearanceDisplayFormPage): 144 """ Page to display student clearance data 145 """ 146 147 @property 148 def form_fields(self): 149 if self.context.is_postgrad: 150 form_fields = grok.AutoFields( 151 ICustomPGStudentClearance).omit('clearance_locked') 152 else: 153 form_fields = grok.AutoFields( 154 ICustomUGStudentClearance).omit('clearance_locked') 155 if not getattr(self.context, 'officer_comment'): 156 form_fields = form_fields.omit('officer_comment') 157 else: 158 form_fields['officer_comment'].custom_widget = BytesDisplayWidget 159 return form_fields 160 161 class CustomStudentClearanceManageFormPage(NigeriaStudentClearanceManageFormPage): 162 """ Page to edit student clearance data 163 """ 164 165 @property 166 def form_fields(self): 167 if self.context.is_postgrad: 168 form_fields = grok.AutoFields( 169 ICustomPGStudentClearance).omit('clr_code') 170 else: 171 form_fields = grok.AutoFields( 172 ICustomUGStudentClearance).omit('clr_code') 173 return form_fields 174 175 class CustomExportPDFClearanceSlip(NigeriaExportPDFClearanceSlip): 176 """Deliver a PDF slip of the context. 177 """ 178 179 @property 180 def form_fields(self): 181 if self.context.is_postgrad: 182 form_fields = grok.AutoFields( 183 ICustomPGStudentClearance).omit('clearance_locked') 184 else: 185 form_fields = grok.AutoFields( 186 ICustomUGStudentClearance).omit('clearance_locked') 187 if not getattr(self.context, 'officer_comment'): 188 form_fields = form_fields.omit('officer_comment') 189 return form_fields 139 190 140 191 class CustomStudentClearanceEditFormPage(NigeriaStudentClearanceEditFormPage):
Note: See TracChangeset for help on using the changeset viewer.
