- Timestamp:
- 16 Apr 2012, 22:24:59 (13 years ago)
- File:
-
- 1 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
Note: See TracChangeset for help on using the changeset viewer.