Ignore:
Timestamp:
15 Apr 2012, 06:40:01 (13 years ago)
Author:
Henrik Bettermann
Message:

Use new date and datetime widgets everywhere in base package.

Use standard datetime widgets for imports. I don't know if this is really necessary.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/applicants
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py

    r8150 r8160  
    5252from waeup.kofa.students.interfaces import IStudentsUtils
    5353from waeup.kofa.utils.helpers import string_from_bytes, file_size
    54 from waeup.kofa.widgets.datewidget import (
    55     FriendlyDateWidget, FriendlyDateDisplayWidget,
    56     FriendlyDatetimeDisplayWidget)
     54from waeup.kofa.widgets.datewidget import FriendlyDateDisplayWidget
    5755from waeup.kofa.widgets.phonewidget import PhoneWidget
    5856from waeup.kofa.widgets.restwidget import ReSTDisplayWidget
     
    153151    form_fields = grok.AutoFields(
    154152        IApplicantsContainerAdd).omit('code').omit('title')
    155     form_fields['startdate'].custom_widget = FriendlyDateWidget('le')
    156     form_fields['enddate'].custom_widget = FriendlyDateWidget('le')
    157153
    158154    def update(self):
     
    226222
    227223    form_fields = grok.AutoFields(IApplicantsContainer).omit('title')
    228     form_fields['startdate'].custom_widget = FriendlyDateDisplayWidget('le')
    229     form_fields['enddate'].custom_widget = FriendlyDateDisplayWidget('le')
    230224    form_fields['description'].custom_widget = ReSTDisplayWidget
    231225
     
    257251    tabthreeactions2 = [_('Add local role')]
    258252    # Use friendlier date widget...
    259     form_fields['startdate'].custom_widget = FriendlyDateWidget('le')
    260     form_fields['enddate'].custom_widget = FriendlyDateWidget('le')
    261253    grok.require('waeup.manageApplication')
    262254
     
    497489    grok.require('waeup.viewApplication')
    498490    form_fields = grok.AutoFields(IApplicantOnlinePayment)
    499     form_fields[
    500         'creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
    501     form_fields[
    502         'payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
    503491    pnav = 3
    504492
     
    546534    grok.require('waeup.viewApplication')
    547535    form_fields = grok.AutoFields(IApplicantOnlinePayment)
    548     form_fields['creation_date'].custom_widget = FriendlyDateDisplayWidget('le')
    549     form_fields['payment_date'].custom_widget = FriendlyDateDisplayWidget('le')
     536    #form_fields['creation_date'].custom_widget = FriendlyDateDisplayWidget('le')
     537    #form_fields['payment_date'].custom_widget = FriendlyDateDisplayWidget('le')
    550538    prefix = 'form'
    551539
     
    754742        'screening_score',
    755743        )
    756     form_fields['date_of_birth'].custom_widget = FriendlyDateWidget('le-year')
    757744    form_fields['phone'].custom_widget = PhoneWidget
    758745    form_fields['applicant_id'].for_display = True
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py

    r8154 r8160  
    221221        """Content as language dictionary with values in HTML format.""")
    222222
    223     startdate = schema.Date(
     223    startdate = FormattedDate(
    224224        title = _(u'Application Start Date'),
    225225        required = False,
    226         )
    227 
    228     enddate = schema.Date(
     226        show_year = False,
     227        )
     228
     229    enddate = FormattedDate(
    229230        title = _(u'Application Closing Date'),
    230231        required = False,
     232        show_year = False,
    231233        )
    232234
Note: See TracChangeset for help on using the changeset viewer.