Changeset 6054 for main/waeup.sirp/trunk/src/waeup
- Timestamp:
- 11 May 2011, 23:48:42 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py
r6053 r6054 48 48 PassportWidget, PassportDisplayWidget 49 49 ) 50 from waeup.sirp.widgets.datewidget import ( 51 FriendlyDateWidget, FriendlyDateDisplayWidget) 52 50 53 #from zope.formlib.objectwidget import ObjectWidget 51 54 from zope.formlib.sequencewidget import ListSequenceWidget, SequenceDisplayWidget … … 74 77 list_results_display_widget = CustomWidgetFactory( 75 78 MultiListDisplayWidget, subwidget=results_display_widget) 76 77 #: A date widget that renders with CSS class `datepicker` thus78 # enabling : the jQuery datepicker for this field if the form loaded79 # the jQuery code.80 FriendlyDateWidget = CustomWidgetFactory(81 DateWidget, cssClass='datepicker')82 79 83 80 class ApplicationsPage(WAeUPPage): … … 226 223 return self.view.application_url('applicants') 227 224 228 from waeup.sirp.widgets.datewidget import (229 FormattedDateWidget, FormattedDateDisplayWidget,)230 231 FriendlyDateWidget = CustomWidgetFactory(232 FormattedDateWidget,233 cssClass='datepicker-le-year',234 date_format='%d/%m/%Y')235 FriendlyDateDisplayWidget = CustomWidgetFactory(236 FormattedDateDisplayWidget,237 date_format='%d/%m/%Y')238 239 225 class ApplicantsContainerPage(WAeUPDisplayFormPage): 240 226 """The standard view for regular applicant containers. … … 247 233 form_fields = grok.AutoFields(IApplicantsContainer) 248 234 # Use friendlier date widget... 249 form_fields['startdate'].custom_widget = FriendlyDateDisplayWidget 250 form_fields['enddate'].custom_widget = FriendlyDateDisplayWidget 235 form_fields['startdate'].custom_widget = FriendlyDateDisplayWidget('le') 236 form_fields['enddate'].custom_widget = FriendlyDateDisplayWidget('le') 251 237 252 238 @property … … 277 263 form_fields = grok.AutoFields(IApplicantsContainer) 278 264 # Use friendlier date widget... 279 form_fields['startdate'].custom_widget = FriendlyDateWidget 280 form_fields['enddate'].custom_widget = FriendlyDateWidget 265 form_fields['startdate'].custom_widget = FriendlyDateWidget('le') 266 form_fields['enddate'].custom_widget = FriendlyDateWidget('le') 281 267 282 268 @property … … 382 368 form_fields['fst_sit_results'].custom_widget = list_results_display_widget 383 369 form_fields['passport'].custom_widget = ThumbnailWidget 370 form_fields['date_of_birth'].custom_widget = FriendlyDateDisplayWidget('le') 384 371 label = 'Applicant' 385 372 title = 'Applicant' … … 394 381 form_fields = grok.AutoFields(IApplicantPDEEditData).omit('locked') 395 382 form_fields['passport'].custom_widget = EncodingImageFileWidget 396 form_fields['date_of_birth'].custom_widget = FriendlyDateWidget 383 form_fields['date_of_birth'].custom_widget = FriendlyDateWidget('le-year') 397 384 grok.template('form_edit_pde') 398 385 … … 462 449 form_fields = grok.AutoFields(IApplicantPDEEditData).omit('locked') 463 450 form_fields['passport'].custom_widget = EncodingImageFileWidget 464 form_fields['date_of_birth'].custom_widget = FriendlyDateWidget 451 form_fields['date_of_birth'].custom_widget = FriendlyDateWidget('le-year') 465 452 grok.template('form_edit_full') 466 453
Note: See TracChangeset for help on using the changeset viewer.