Changeset 1828
- Timestamp:
- 29 May 2007, 15:40:38 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/PatchExtendedWidgetsCPSDateTimeWidget.py
r1804 r1828 3 3 from DateTime.DateTime import DateTime 4 4 from Products.CPSSchemas.ExtendedWidgets import CPSDateTimeWidget 5 CPSDateTimeWidget.time_hour_default = '00' 5 6 6 7 def validate(self, datastructure, **kw): … … 30 31 datamodel[field_id] = None 31 32 return 1 32 33 # import pdb;pdb.set_trace() 33 34 if self.view_format.startswith('iso8601'): 34 35 if re.match(r'^[0-9]+-[0-9]{2}-[0-9]{2}', date) is not None: … … 39 40 else: 40 41 if re.match(r'^[0-9]?[0-9]/[0-9]?[0-9]/[0-9]{2,4}$', date) is not None: 41 locale = self.translation_service.getSelectedLanguage()42 if locale in ('en', 'hu'):43 m, d, y = date.split('/')44 else:45 d, m, y = date.split('/')42 d, m, y = date.split('/') # always use d/m/y 43 # locale = self.translation_service.getSelectedLanguage() 44 # if False and locale in ('en', 'hu'): 45 # m, d, y = date.split('/') 46 # else: 46 47 else: 47 48 datastructure.setError(widget_id, 'cpsschemas_err_date') … … 58 59 datamodel[field_id] = v 59 60 return 1 61 60 62 61 63 CPSDateTimeWidget.validate = validate -
WAeUP_SRP/trunk/profiles/default/layouts/import_student.xml
r1804 r1828 124 124 <property name="hidden_layout_modes"/> 125 125 <property name="hidden_readonly_layout_modes"/> 126 <property name="view_format"> iso8601</property>126 <property name="view_format">%d/%m/%Y</property> 127 127 <property name="time_setting">False</property> 128 128 <property name="time_hour_default">00</property> -
WAeUP_SRP/trunk/profiles/default/layouts/student_application.xml
r1790 r1828 20 20 <property name="hidden_layout_modes"/> 21 21 <property name="hidden_readonly_layout_modes"/> 22 <property name="view_format">%d/%m/%Y</property> 23 <property name="time_setting">False</property> 22 24 </widget> 23 25 <widget name="app_ac_pin" meta_type="Scratchcard Pin Widget"> -
WAeUP_SRP/trunk/profiles/default/layouts/student_application_fe.xml
r1790 r1828 22 22 </property> 23 23 <property name="hidden_readonly_layout_modes"/> 24 <property name="view_format">medium</property> 24 <property name="view_format">%d/%m/%Y</property> 25 <property name="time_setting">False</property> 25 26 </widget> 26 27 <widget name="app_ac_pin" meta_type="Scratchcard Pin Widget"> … … 54 55 </property> 55 56 <property name="hidden_readonly_layout_modes"/> 56 <property name="view_format">medium</property> 57 <property name="view_format">%d/%m/%Y</property> 58 <property name="time_setting">False</property> 57 59 </widget> 58 60 <widget name="entry_mode" meta_type="Select Widget"> -
WAeUP_SRP/trunk/profiles/default/layouts/student_clearance.xml
r1821 r1828 71 71 </property> 72 72 <property name="hidden_readonly_layout_modes"/> 73 <property name="view_format"> iso8601_medium_easy</property>73 <property name="view_format">%d/%m/%Y</property> 74 74 <property name="time_setting">False</property> 75 75 </widget> … … 162 162 </property> 163 163 <property name="hidden_readonly_layout_modes"/> 164 <property name="view_format"> iso8601_medium_easy</property>164 <property name="view_format">%d/%m/%Y</property> 165 165 <property name="time_setting">False</property> 166 166 </widget> … … 243 243 </property> 244 244 <property name="hidden_readonly_layout_modes"/> 245 <property name="view_format"> iso8601_medium_easy</property>245 <property name="view_format">%d/%m/%Y</property> 246 246 <property name="time_setting">False</property> 247 247 </widget> … … 260 260 </property> 261 261 <property name="hidden_readonly_layout_modes"/> 262 <property name="view_format"> iso8601_medium_easy</property>262 <property name="view_format">%d/%m/%Y</property> 263 263 <property name="time_setting">False</property> 264 264 </widget> … … 277 277 </property> 278 278 <property name="hidden_readonly_layout_modes"/> 279 <property name="view_format"> iso8601_medium_easy</property>279 <property name="view_format">%d/%m/%Y</property> 280 280 <property name="time_setting">False</property> 281 281 </widget> … … 335 335 </property> 336 336 <property name="hidden_readonly_layout_modes"/> 337 <property name="view_format"> iso8601_medium_easy</property>337 <property name="view_format">%d/%m/%Y</property> 338 338 <property name="time_setting">False</property> 339 339 </widget> … … 650 650 </property> 651 651 <property name="hidden_readonly_layout_modes"/> 652 <property name="view_format"> iso8601_medium_easy</property>652 <property name="view_format">%d/%m/%Y</property> 653 653 <property name="time_setting">False</property> 654 654 </widget> -
WAeUP_SRP/trunk/profiles/default/layouts/student_clearance_fe.xml
r1821 r1828 72 72 </property> 73 73 <property name="hidden_readonly_layout_modes"/> 74 <property name="view_format"> iso8601_medium_easy</property>74 <property name="view_format">%d/%m/%Y</property> 75 75 <property name="time_setting">False</property> 76 76 </widget> … … 163 163 </property> 164 164 <property name="hidden_readonly_layout_modes"/> 165 <property name="view_format"> iso8601_medium_easy</property>165 <property name="view_format">%d/%m/%Y</property> 166 166 <property name="time_setting">False</property> 167 167 </widget> … … 244 244 </property> 245 245 <property name="hidden_readonly_layout_modes"/> 246 <property name="view_format"> iso8601_medium_easy</property>246 <property name="view_format">%d/%m/%Y</property> 247 247 <property name="time_setting">False</property> 248 248 </widget> … … 261 261 </property> 262 262 <property name="hidden_readonly_layout_modes"/> 263 <property name="view_format"> iso8601_medium_easy</property>263 <property name="view_format">%d/%m/%Y</property> 264 264 <property name="time_setting">False</property> 265 265 </widget> … … 278 278 </property> 279 279 <property name="hidden_readonly_layout_modes"/> 280 <property name="view_format"> iso8601_medium_easy</property>280 <property name="view_format">%d/%m/%Y</property> 281 281 <property name="time_setting">False</property> 282 282 </widget> … … 325 325 </property> 326 326 <property name="hidden_readonly_layout_modes"/> 327 <property name="view_format"> iso8601_medium_easy</property>327 <property name="view_format">%d/%m/%Y</property> 328 328 <property name="time_setting">False</property> 329 329 </widget> … … 643 643 </property> 644 644 <property name="hidden_readonly_layout_modes"/> 645 <property name="view_format"> iso8601_medium_easy</property>645 <property name="view_format">%d/%m/%Y</property> 646 646 <property name="time_setting">False</property> 647 647 </widget> -
WAeUP_SRP/trunk/skins/waeup_custom/widget_datetime_render.pt
r848 r1828 15 15 <tal:block define="name here/getHtmlWidgetId; 16 16 date_day_fmt python:fmt.startswith('iso8601') 17 and 'iso8601_short' or 'short'"17 and 'iso8601_short' or fmt" 18 18 condition="python: mode == 'edit'"> 19 19 <input type="text" size="11" maxlength="22"
Note: See TracChangeset for help on using the changeset viewer.