Changeset 8184 for main/waeup.uniben/trunk/src/waeup/uniben/applicants
- Timestamp:
- 16 Apr 2012, 22:24:59 (13 years ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben/applicants
- Files:
-
- 2 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,
Note: See TracChangeset for help on using the changeset viewer.