Changeset 8184 for main/waeup.uniben/trunk/src/waeup/uniben/students
- Timestamp:
- 16 Apr 2012, 22:24:59 (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
r8144 r8184 19 19 from zope.formlib.textwidgets import BytesDisplayWidget 20 20 from zope.component import getUtility 21 from waeup.kofa.widgets.datewidget import (22 FriendlyDateWidget, FriendlyDateDisplayWidget23 )24 21 from waeup.kofa.interfaces import IExtFileStore 25 22 from waeup.kofa.students.browser import ( … … 88 85 if cm is not None and cm.startswith('pg'): 89 86 form_fields = grok.AutoFields(IPGStudentClearance).omit('clearance_locked') 90 form_fields['emp_start'].custom_widget = FriendlyDateDisplayWidget('le')91 form_fields['emp_end'].custom_widget = FriendlyDateDisplayWidget('le')92 form_fields['emp2_start'].custom_widget = FriendlyDateDisplayWidget('le')93 form_fields['emp2_end'].custom_widget = FriendlyDateDisplayWidget('le')94 87 else: 95 88 form_fields = grok.AutoFields(IUGStudentClearance).omit('clearance_locked') 96 form_fields['date_of_birth'].custom_widget = FriendlyDateDisplayWidget('le')97 form_fields['fst_sit_date'].custom_widget = FriendlyDateDisplayWidget('le')98 form_fields['scd_sit_date'].custom_widget = FriendlyDateDisplayWidget('le')99 form_fields['scd_sit_date'].custom_widget = FriendlyDateDisplayWidget('le')100 form_fields['alr_date'].custom_widget = FriendlyDateDisplayWidget('le')101 89 return form_fields 102 90 … … 111 99 if cm is not None and cm.startswith('pg'): 112 100 form_fields = grok.AutoFields(IPGStudentClearance).omit('clearance_locked') 113 form_fields['emp_start'].custom_widget = FriendlyDateDisplayWidget('le')114 form_fields['emp_end'].custom_widget = FriendlyDateDisplayWidget('le')115 form_fields['emp2_start'].custom_widget = FriendlyDateDisplayWidget('le')116 form_fields['emp2_end'].custom_widget = FriendlyDateDisplayWidget('le')117 101 else: 118 102 form_fields = grok.AutoFields(IUGStudentClearance).omit('clearance_locked') 119 form_fields['date_of_birth'].custom_widget = FriendlyDateDisplayWidget('le')120 form_fields['fst_sit_date'].custom_widget = FriendlyDateDisplayWidget('le')121 form_fields['scd_sit_date'].custom_widget = FriendlyDateDisplayWidget('le')122 form_fields['scd_sit_date'].custom_widget = FriendlyDateDisplayWidget('le')123 form_fields['alr_date'].custom_widget = FriendlyDateDisplayWidget('le')124 103 return form_fields 125 104 … … 134 113 if cm is not None and cm.startswith('pg'): 135 114 form_fields = grok.AutoFields(IPGStudentClearance) 136 form_fields['emp_start'].custom_widget = FriendlyDateWidget('le-year')137 form_fields['emp_end'].custom_widget = FriendlyDateWidget('le-year')138 form_fields['emp2_start'].custom_widget = FriendlyDateWidget('le-year')139 form_fields['emp2_end'].custom_widget = FriendlyDateWidget('le-year')140 115 else: 141 116 form_fields = grok.AutoFields(IUGStudentClearance) 142 form_fields['date_of_birth'].custom_widget = FriendlyDateWidget('le-year')143 form_fields['fst_sit_date'].custom_widget = FriendlyDateWidget('le-year')144 form_fields['scd_sit_date'].custom_widget = FriendlyDateWidget('le-year')145 form_fields['scd_sit_date'].custom_widget = FriendlyDateWidget('le-year')146 form_fields['alr_date'].custom_widget = FriendlyDateWidget('le-year')147 148 149 117 return form_fields 150 118 … … 159 127 if cm is not None and cm.startswith('pg'): 160 128 form_fields = grok.AutoFields(IPGStudentClearance).omit('clearance_locked') 161 form_fields['emp_start'].custom_widget = FriendlyDateWidget('le-year')162 form_fields['emp_end'].custom_widget = FriendlyDateWidget('le-year')163 form_fields['emp2_start'].custom_widget = FriendlyDateWidget('le-year')164 form_fields['emp2_end'].custom_widget = FriendlyDateWidget('le-year')165 129 else: 166 130 form_fields = grok.AutoFields(IUGStudentClearance).omit('clearance_locked') 167 form_fields['date_of_birth'].custom_widget = FriendlyDateWidget('le-year')168 form_fields['fst_sit_date'].custom_widget = FriendlyDateWidget('le-year')169 form_fields['scd_sit_date'].custom_widget = FriendlyDateWidget('le-year')170 form_fields['scd_sit_date'].custom_widget = FriendlyDateWidget('le-year')171 form_fields['alr_date'].custom_widget = FriendlyDateWidget('le-year')172 131 return form_fields 173 132 -
main/waeup.uniben/trunk/src/waeup/uniben/students/interfaces.py
r8136 r8184 19 19 from waeup.kofa.schema import TextLineChoice 20 20 from waeup.kofa.interfaces import SimpleKofaVocabulary 21 from waeup.kofa.schema import FormattedDate 21 22 from waeup.kofa.schoolgrades import ResultEntryField 22 23 from waeup.kofa.students.vocabularies import nats_vocab … … 61 62 62 63 """ 63 date_of_birth = schema.Date(64 date_of_birth = FormattedDate( 64 65 title = _(u'Date of Birth'), 65 66 required = False, … … 95 96 ) 96 97 97 fst_sit_date = schema.Date(98 fst_sit_date = FormattedDate( 98 99 title = _(u'Exam Date'), 99 100 required = False, … … 127 128 ) 128 129 129 scd_sit_date = schema.Date(130 scd_sit_date = FormattedDate( 130 131 title = _(u'Exam Date'), 131 132 required = False, … … 159 160 ) 160 161 161 alr_date = schema.Date(162 alr_date = FormattedDate( 162 163 title = _(u'Exam Date'), 163 164 required = False, … … 279 280 ) 280 281 281 emp_start = schema.Date(282 emp_start = FormattedDate( 282 283 title = _(u'Start Date'), 283 284 required = False, … … 285 286 ) 286 287 287 emp_end = schema.Date(288 emp_end = FormattedDate( 288 289 title = _(u'End Date'), 289 290 required = False, … … 309 310 ) 310 311 311 emp2_start = schema.Date(312 emp2_start = FormattedDate( 312 313 title = _(u'Start Date'), 313 314 required = False, 314 315 readonly = False, 315 316 ) 316 emp2_end = schema.Date(317 emp2_end = FormattedDate( 317 318 title = _(u'End Date'), 318 319 required = False,
Note: See TracChangeset for help on using the changeset viewer.