Changeset 8184 for main/waeup.uniben
- Timestamp:
- 16 Apr 2012, 22:24:59 (13 years ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/applicants/browser.py
r8090 r8184 19 19 """ 20 20 import grok 21 from waeup.kofa.widgets.datewidget import (22 FriendlyDateWidget, FriendlyDateDisplayWidget,23 FriendlyDatetimeDisplayWidget)24 21 from waeup.uniben.widgets.phonewidget import PhoneWidget 25 22 from waeup.kofa.applicants.interfaces import ( … … 59 56 form_fields = grok.AutoFields(IUGApplicant).omit( 60 57 'locked', 'course_admitted') 61 form_fields[62 'date_of_birth'].custom_widget = FriendlyDateDisplayWidget('le')63 58 return form_fields 64 59 … … 84 79 form_fields = grok.AutoFields(IUGApplicant).omit( 85 80 'locked', 'course_admitted', 'password') 86 form_fields[87 'date_of_birth'].custom_widget = FriendlyDateDisplayWidget('le')88 81 return form_fields 89 82 … … 97 90 if target is not None and target.startswith('pg'): 98 91 form_fields = grok.AutoFields(IPGApplicant) 99 form_fields[100 'emp_start'].custom_widget = FriendlyDateWidget('le-year')101 form_fields[102 'emp_end'].custom_widget = FriendlyDateWidget('le-year')103 form_fields[104 'emp2_start'].custom_widget = FriendlyDateWidget('le-year')105 form_fields[106 'emp2_end'].custom_widget = FriendlyDateWidget('le-year')107 92 else: 108 93 form_fields = grok.AutoFields(IUGApplicant) 109 form_fields[110 'date_of_birth'].custom_widget = FriendlyDateWidget('le-year')111 94 form_fields['phone'].custom_widget = PhoneWidget 112 95 form_fields['student_id'].for_display = True … … 126 109 'screening_score', 'screening_venue' 127 110 ) 128 form_fields[129 'emp_start'].custom_widget = FriendlyDateWidget('le-year')130 form_fields[131 'emp_end'].custom_widget = FriendlyDateWidget('le-year')132 form_fields[133 'emp2_start'].custom_widget = FriendlyDateWidget('le-year')134 form_fields[135 'emp2_end'].custom_widget = FriendlyDateWidget('le-year')136 111 else: 137 112 form_fields = grok.AutoFields(IUGApplicantEdit).omit( … … 139 114 'screening_score' 140 115 ) 141 form_fields[142 'date_of_birth'].custom_widget = FriendlyDateWidget('le-year')143 116 form_fields['phone'].custom_widget = PhoneWidget 144 117 form_fields['applicant_id'].for_display = True -
main/waeup.uniben/trunk/src/waeup/uniben/applicants/interfaces.py
r8101 r8184 25 25 from waeup.kofa.schoolgrades import ResultEntryField 26 26 from waeup.kofa.interfaces import SimpleKofaVocabulary 27 from waeup.kofa.schema import FormattedDate 27 28 from waeup.kofa.students.vocabularies import nats_vocab 28 29 from waeup.uniben.interfaces import ( 29 30 lgas_vocab, high_qual, high_grade, exam_types) 30 31 from waeup.uniben.interfaces import MessageFactory as _ 32 31 33 32 34 class IUGApplicant(IApplicantBaseData): … … 150 152 readonly = False, 151 153 ) 152 emp_start = schema.Date(154 emp_start = FormattedDate( 153 155 title = _(u'Start Date'), 154 156 required = False, 155 157 readonly = False, 156 158 ) 157 emp_end = schema.Date(159 emp_end = FormattedDate( 158 160 title = _(u'End Date'), 159 161 required = False, … … 175 177 readonly = False, 176 178 ) 177 emp2_start = schema.Date(179 emp2_start = FormattedDate( 178 180 title = _(u'Start Date'), 179 181 required = False, 180 182 readonly = False, 181 183 ) 182 emp2_end = schema.Date(184 emp2_end = FormattedDate( 183 185 title = _(u'End Date'), 184 186 required = False, -
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.