Changeset 11864
- Timestamp:
- 21 Oct 2014, 08:10:34 (10 years ago)
- Location:
- main/waeup.kwarapoly/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kwarapoly/trunk/CHANGES.txt
r11847 r11864 4 4 1.2dev (unreleased) 5 5 =================== 6 7 * Add PIN fields to first and second sitting sections on UG clearance form'. 6 8 7 9 * Add PIN fields to 'O' level section on application form'. -
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/browser.py
r11539 r11864 29 29 StudentBasePDFFormPage) 30 30 from waeup.kwarapoly.students.interfaces import ( 31 ICustomStudent, ICustomStudentBase, ICustomStudentStudyLevel) 31 ICustomStudent, ICustomStudentBase, ICustomStudentStudyLevel, 32 ICustomUGStudentClearance, ICustomPGStudentClearance) 32 33 from waeup.kwarapoly.interfaces import MessageFactory as _ 33 34 from waeup.kofa.students.workflow import ( … … 38 39 NigeriaOnlinePaymentAddFormPage, 39 40 NigeriaExportPDFPaymentSlipPage, 41 NigeriaStudentClearanceDisplayFormPage, 42 NigeriaExportPDFClearanceSlipPage, 40 43 NigeriaStudentClearanceEditFormPage, 41 44 NigeriaExportPDFCourseRegistrationSlipPage, 42 45 NigeriaStudentPersonalDisplayFormPage, 46 NigeriaStudentClearanceManageFormPage, 43 47 NigeriaStudentPersonalEditFormPage, 44 48 NigeriaStudentPersonalManageFormPage, … … 113 117 with_ac = False 114 118 119 120 class CustomStudentClearanceDisplayFormPage(NigeriaStudentClearanceDisplayFormPage): 121 """ Page to display student clearance data 122 """ 123 124 @property 125 def form_fields(self): 126 if self.context.is_postgrad: 127 form_fields = grok.AutoFields( 128 ICustomPGStudentClearance).omit('clearance_locked') 129 else: 130 form_fields = grok.AutoFields( 131 ICustomUGStudentClearance).omit('clearance_locked') 132 if not getattr(self.context, 'officer_comment'): 133 form_fields = form_fields.omit('officer_comment') 134 else: 135 form_fields['officer_comment'].custom_widget = BytesDisplayWidget 136 return form_fields 137 138 class CustomExportPDFClearanceSlipPage(NigeriaExportPDFClearanceSlipPage): 139 """Deliver a PDF slip of the context. 140 """ 141 142 @property 143 def form_fields(self): 144 if self.context.is_postgrad: 145 form_fields = grok.AutoFields( 146 ICustomPGStudentClearance).omit('clearance_locked') 147 else: 148 form_fields = grok.AutoFields( 149 ICustomUGStudentClearance).omit('clearance_locked') 150 if not getattr(self.context, 'officer_comment'): 151 form_fields = form_fields.omit('officer_comment') 152 return form_fields 153 154 class CustomStudentClearanceManageFormPage(NigeriaStudentClearanceManageFormPage): 155 """ Page to edit student clearance data 156 """ 157 158 @property 159 def form_fields(self): 160 if self.context.is_postgrad: 161 form_fields = grok.AutoFields( 162 ICustomPGStudentClearance).omit('clr_code') 163 else: 164 form_fields = grok.AutoFields( 165 ICustomUGStudentClearance).omit('clr_code') 166 return form_fields 167 115 168 class CustomStudentClearanceEditFormPage(NigeriaStudentClearanceEditFormPage): 116 169 """ View to edit student clearance data by student … … 119 172 def dataNotComplete(self): 120 173 return False 174 175 @property 176 def form_fields(self): 177 if self.context.is_postgrad: 178 form_fields = grok.AutoFields(ICustomPGStudentClearance).omit( 179 'clearance_locked', 'nysc_location', 'clr_code', 'officer_comment') 180 else: 181 form_fields = grok.AutoFields(ICustomUGStudentClearance).omit( 182 'clearance_locked', 'clr_code', 'officer_comment') 183 return form_fields 121 184 122 185 class BedTicketAddPage(BedTicketAddPage): -
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/students/interfaces.py
r10710 r11864 93 93 """ 94 94 95 fst_sit_pin = schema.TextLine( 96 title = _(u'Result Checking PIN'), 97 required = False, 98 readonly = False, 99 ) 100 101 fst_sit_pin_serial = schema.TextLine( 102 title = _(u'PIN Serial Number'), 103 required = False, 104 readonly = False, 105 ) 106 107 scd_sit_pin = schema.TextLine( 108 title = _(u'Result Checking PIN'), 109 required = False, 110 readonly = False, 111 ) 112 113 scd_sit_pin_serial = schema.TextLine( 114 title = _(u'PIN Serial Number'), 115 required = False, 116 readonly = False, 117 ) 118 119 ICustomUGStudentClearance['fst_sit_pin'].order = ICustomUGStudentClearance[ 120 'fst_sit_results'].order 121 ICustomUGStudentClearance['fst_sit_pin_serial'].order = ICustomUGStudentClearance[ 122 'fst_sit_results'].order 123 ICustomUGStudentClearance['scd_sit_pin'].order = ICustomUGStudentClearance[ 124 'scd_sit_results'].order 125 ICustomUGStudentClearance['scd_sit_pin_serial'].order = ICustomUGStudentClearance[ 126 'scd_sit_results'].order 127 128 95 129 class ICustomPGStudentClearance(INigeriaPGStudentClearance): 96 130 """Representation of pg student clearance data.
Note: See TracChangeset for help on using the changeset viewer.