Changeset 8108 for main/waeup.uniben/trunk/src/waeup
- Timestamp:
- 11 Apr 2012, 13:52:36 (13 years ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben/students
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py
r8076 r8108 85 85 if cm is not None and cm.startswith('pg'): 86 86 form_fields = grok.AutoFields(IPGStudentClearance).omit('clearance_locked') 87 form_fields['emp_start'].custom_widget = FriendlyDateDisplayWidget('le') 88 form_fields['emp_end'].custom_widget = FriendlyDateDisplayWidget('le') 89 form_fields['emp2_start'].custom_widget = FriendlyDateDisplayWidget('le') 90 form_fields['emp2_end'].custom_widget = FriendlyDateDisplayWidget('le') 87 91 else: 88 92 form_fields = grok.AutoFields(IUGStudentClearance).omit('clearance_locked') 89 93 form_fields['date_of_birth'].custom_widget = FriendlyDateDisplayWidget('le') 94 form_fields['fst_sit_date'].custom_widget = FriendlyDateDisplayWidget('le') 95 form_fields['scd_sit_date'].custom_widget = FriendlyDateDisplayWidget('le') 96 form_fields['scd_sit_date'].custom_widget = FriendlyDateDisplayWidget('le') 97 form_fields['alr_date'].custom_widget = FriendlyDateDisplayWidget('le') 90 98 return form_fields 91 99 … … 100 108 if cm is not None and cm.startswith('pg'): 101 109 form_fields = grok.AutoFields(IPGStudentClearance).omit('clearance_locked') 110 form_fields['emp_start'].custom_widget = FriendlyDateWidget('le-year') 111 form_fields['emp_end'].custom_widget = FriendlyDateWidget('le-year') 112 form_fields['emp2_start'].custom_widget = FriendlyDateWidget('le-year') 113 form_fields['emp2_end'].custom_widget = FriendlyDateWidget('le-year') 102 114 else: 103 115 form_fields = grok.AutoFields(IUGStudentClearance).omit('clearance_locked') 104 116 form_fields['date_of_birth'].custom_widget = FriendlyDateDisplayWidget('le') 117 form_fields['fst_sit_date'].custom_widget = FriendlyDateWidget('le-year') 118 form_fields['scd_sit_date'].custom_widget = FriendlyDateWidget('le-year') 119 form_fields['scd_sit_date'].custom_widget = FriendlyDateWidget('le-year') 120 form_fields['alr_date'].custom_widget = FriendlyDateWidget('le-year') 105 121 return form_fields 106 122 … … 115 131 if cm is not None and cm.startswith('pg'): 116 132 form_fields = grok.AutoFields(IPGStudentClearance) 133 form_fields['emp_start'].custom_widget = FriendlyDateWidget('le-year') 134 form_fields['emp_end'].custom_widget = FriendlyDateWidget('le-year') 135 form_fields['emp2_start'].custom_widget = FriendlyDateWidget('le-year') 136 form_fields['emp2_end'].custom_widget = FriendlyDateWidget('le-year') 117 137 else: 118 138 form_fields = grok.AutoFields(IUGStudentClearance) 119 139 form_fields['date_of_birth'].custom_widget = FriendlyDateWidget('le-year') 140 form_fields['fst_sit_date'].custom_widget = FriendlyDateWidget('le-year') 141 form_fields['scd_sit_date'].custom_widget = FriendlyDateWidget('le-year') 142 form_fields['scd_sit_date'].custom_widget = FriendlyDateWidget('le-year') 143 form_fields['alr_date'].custom_widget = FriendlyDateWidget('le-year') 144 145 120 146 return form_fields 121 147 … … 130 156 if cm is not None and cm.startswith('pg'): 131 157 form_fields = grok.AutoFields(IPGStudentClearance).omit('clearance_locked') 158 form_fields['emp_start'].custom_widget = FriendlyDateWidget('le-year') 159 form_fields['emp_end'].custom_widget = FriendlyDateWidget('le-year') 160 form_fields['emp2_start'].custom_widget = FriendlyDateWidget('le-year') 161 form_fields['emp2_end'].custom_widget = FriendlyDateWidget('le-year') 132 162 else: 133 163 form_fields = grok.AutoFields(IUGStudentClearance).omit('clearance_locked') 134 164 form_fields['date_of_birth'].custom_widget = FriendlyDateWidget('le-year') 165 form_fields['fst_sit_date'].custom_widget = FriendlyDateWidget('le-year') 166 form_fields['scd_sit_date'].custom_widget = FriendlyDateWidget('le-year') 167 form_fields['scd_sit_date'].custom_widget = FriendlyDateWidget('le-year') 168 form_fields['alr_date'].custom_widget = FriendlyDateWidget('le-year') 135 169 return form_fields 136 170 -
main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py
r8107 r8108 32 32 label = _(u'LGA Identification') 33 33 title = _(u'LGA Identification Scan') 34 download_name = u'lga_ident ification'34 download_name = u'lga_ident' 35 35 36 36 class LGAIdentificationSlip(LGAIdentificationDisplay): … … 44 44 title = _(u'LGA Identification Scan') 45 45 mus = 1024 * 150 46 download_name = u'lga_ident ification'46 download_name = u'lga_ident' 47 47 tab_redirect = '?tab2' 48 48 … … 50 50 """Renders LGA Identification scan. 51 51 """ 52 grok.name('lga_identification') 53 download_name = u'lga_identification' 52 grok.name('lga_ident') 53 download_name = u'lga_ident' 54 55 # First Sitting Result 56 57 class FirstSittingResultDisplay(FileDisplay): 58 """First Sitting Result display viewlet. 59 """ 60 grok.order(1) 61 label = _(u'First Sitting Result') 62 title = _(u'First Sitting Result') 63 download_name = u'fst_sit_scan' 64 65 class FirstSittingResultSlip(FirstSittingResultDisplay): 66 grok.view(ExportPDFClearanceSlipPage) 67 68 class FirstSittingResultUpload(FileUpload): 69 """First Sitting Result upload viewlet. 70 """ 71 grok.order(2) 72 label = _(u'First Sitting Result') 73 title = _(u'First Sitting Result Scan') 74 mus = 1024 * 150 75 download_name = u'fst_sit_scan' 76 tab_redirect = '?tab2' 77 78 class FirstSittingResultImage(Image): 79 """Renders First Sitting Result scan. 80 """ 81 grok.name('fst_sit_scan') 82 download_name = u'fst_sit_scan' 83 84 # Second Sitting Result 85 86 class SecondSittingResultDisplay(FileDisplay): 87 """Second Sitting Result display viewlet. 88 """ 89 grok.order(1) 90 label = _(u'Second Sitting Result') 91 title = _(u'Second Sitting Result') 92 download_name = u'scd_sit_scan' 93 94 class SecondSittingResultSlip(SecondSittingResultDisplay): 95 grok.view(ExportPDFClearanceSlipPage) 96 97 class SecondSittingResultUpload(FileUpload): 98 """Second Sitting Result upload viewlet. 99 """ 100 grok.order(2) 101 label = _(u'Second Sitting Result') 102 title = _(u'Second Sitting Result Scan') 103 mus = 1024 * 150 104 download_name = u'scd_sit_scan' 105 tab_redirect = '?tab2' 106 107 class SecondSittingResultImage(Image): 108 """Renders Second Sitting Result scan. 109 """ 110 grok.name('scd_sit_scan') 111 download_name = u'scd_sit_scan' 112 113 # Higher Qualification Result 114 115 class HigherQualificationResultDisplay(FileDisplay): 116 """Higher Qualification Result display viewlet. 117 """ 118 grok.order(1) 119 label = _(u'Higher Qualification Result') 120 title = _(u'Higher Qualification Result') 121 download_name = u'hq_scan' 122 123 class HigherQualificationResultSlip(HigherQualificationResultDisplay): 124 grok.view(ExportPDFClearanceSlipPage) 125 126 class HigherQualificationResultUpload(FileUpload): 127 """Higher Qualification Result upload viewlet. 128 """ 129 grok.order(2) 130 label = _(u'Higher Qualification Result') 131 title = _(u'Higher Qualification Result Scan') 132 mus = 1024 * 150 133 download_name = u'hq_scan' 134 tab_redirect = '?tab2' 135 136 class HigherQualificationResultImage(Image): 137 """Renders Higher Qualification Result scan. 138 """ 139 grok.name('hq_scan') 140 download_name = u'hq_scan' 141 142 # 2nd Higher Qualification Result 143 144 class SecondHigherQualificationResultDisplay(FileDisplay): 145 """Second Higher Qualification Result display viewlet. 146 """ 147 grok.order(1) 148 label = _(u'Second Higher Qualification Result') 149 title = _(u'Second Higher Qualification Result') 150 download_name = u'hq_scan2' 151 152 class SecondHigherQualificationResultSlip(SecondHigherQualificationResultDisplay): 153 grok.view(ExportPDFClearanceSlipPage) 154 155 class SecondHigherQualificationResultUpload(FileUpload): 156 """Second Higher Qualification Result upload viewlet. 157 """ 158 grok.order(2) 159 label = _(u'Second Higher Qualification Result') 160 title = _(u'Second Higher Qualification Result Scan') 161 mus = 1024 * 150 162 download_name = u'hq_scan2' 163 tab_redirect = '?tab2' 164 165 class SecondHigherQualificationResultImage(Image): 166 """Renders Second Higher Qualification Result scan. 167 """ 168 grok.name('hq_scan2') 169 download_name = u'hq_scan2' 170 171 # Evidence of Name 172 173 class EvidenceOfNameDisplay(FileDisplay): 174 """Evidence of Name display viewlet. 175 """ 176 grok.order(1) 177 label = _(u'Evidence of Name') 178 title = _(u'Evidence of Name') 179 download_name = u'evid' 180 181 class EvidenceOfNameSlip(EvidenceOfNameDisplay): 182 grok.view(ExportPDFClearanceSlipPage) 183 184 class EvidenceOfNameUpload(FileUpload): 185 """Evidence of Name upload viewlet. 186 """ 187 grok.order(2) 188 label = _(u'Evidence of Name') 189 title = _(u'Evidence of Name Scan') 190 mus = 1024 * 150 191 download_name = u'evid' 192 tab_redirect = '?tab2' 193 194 class EvidenceOfNameImage(Image): 195 """Renders Evidence of Name scan. 196 """ 197 grok.name('evid') 198 download_name = u'evid'
Note: See TracChangeset for help on using the changeset viewer.