- Timestamp:
- 17 Aug 2016, 05:59:38 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py
r14068 r14084 53 53 NigeriaExportPDFPaymentSlip, 54 54 NigeriaExportPDFCourseRegistrationSlip, 55 NigeriaExportPDFClearanceSlip,56 55 NigeriaStudentPersonalDisplayFormPage, 57 56 NigeriaStudentPersonalEditFormPage, 58 57 NigeriaStudentPersonalManageFormPage, 58 NigeriaStudentClearanceDisplayFormPage, 59 NigeriaExportPDFClearanceSlip, 60 NigeriaStudentClearanceManageFormPage, 59 61 NigeriaStudentClearanceEditFormPage, 60 62 NigeriaAccommodationManageFormPage, … … 69 71 ICustomStudentPersonalEdit, 70 72 ICustomUGStudentClearance, 73 ICustomPGStudentClearance, 71 74 ICustomCourseTicket, 72 75 ICustomStudentBase) … … 112 115 form_fields[ 113 116 'personal_updated'].custom_widget = FriendlyDatetimeDisplayWidget('le') 117 118 class CustomStudentClearanceDisplayFormPage(NigeriaStudentClearanceDisplayFormPage): 119 """ Page to display student clearance data 120 """ 121 122 @property 123 def form_fields(self): 124 if self.context.is_postgrad: 125 form_fields = grok.AutoFields( 126 ICustomPGStudentClearance).omit('clearance_locked') 127 else: 128 form_fields = grok.AutoFields( 129 ICustomUGStudentClearance).omit('clearance_locked') 130 if not getattr(self.context, 'officer_comment'): 131 form_fields = form_fields.omit('officer_comment') 132 else: 133 form_fields['officer_comment'].custom_widget = BytesDisplayWidget 134 return form_fields 135 136 class CustomStudentClearanceManageFormPage(NigeriaStudentClearanceManageFormPage): 137 """ Page to edit student clearance data 138 """ 139 140 @property 141 def form_fields(self): 142 if self.context.is_postgrad: 143 form_fields = grok.AutoFields( 144 ICustomPGStudentClearance).omit('clr_code') 145 else: 146 form_fields = grok.AutoFields( 147 ICustomUGStudentClearance).omit('clr_code') 148 return form_fields 114 149 115 150 class CustomStudentClearanceEditFormPage(NigeriaStudentClearanceEditFormPage): … … 435 470 target_language=portal_language) \ 436 471 + ' %s' % self.context.display_fullname 472 473 @property 474 def form_fields(self): 475 if self.context.is_postgrad: 476 form_fields = grok.AutoFields( 477 ICustomPGStudentClearance).omit('clearance_locked') 478 else: 479 form_fields = grok.AutoFields( 480 ICustomUGStudentClearance).omit('clearance_locked') 481 if not getattr(self.context, 'officer_comment'): 482 form_fields = form_fields.omit('officer_comment') 483 return form_fields 437 484 438 485 class StudentGetMatricNumberPage(UtilityView, grok.View):
Note: See TracChangeset for help on using the changeset viewer.