Changeset 8170


Ignore:
Timestamp:
16 Apr 2012, 07:39:11 (13 years ago)
Author:
uli
Message:

Stamp FormattedDatetime? out completely.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
4 edited

Legend:

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

    r8160 r8170  
    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 FriendlyDateDisplayWidget
     54from waeup.kofa.widgets.datewidget import (
     55    FriendlyDateDisplayWidget, FriendlyDateDisplayWidget,
     56    FriendlyDatetimeDisplayWidget)
    5557from waeup.kofa.widgets.phonewidget import PhoneWidget
    5658from waeup.kofa.widgets.restwidget import ReSTDisplayWidget
     
    489491    grok.require('waeup.viewApplication')
    490492    form_fields = grok.AutoFields(IApplicantOnlinePayment)
     493    form_fields[
     494        'creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
     495    form_fields[
     496        'payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
    491497    pnav = 3
    492498
     
    494500    def label(self):
    495501        return _('${a}: Online Payment Ticket ${b}', mapping = {
    496             'a':self.context.__parent__.display_fullname, 'b':self.context.p_id})
     502            'a':self.context.__parent__.display_fullname,
     503            'b':self.context.p_id})
    497504
    498505class OnlinePaymentCallbackPage(UtilityView, grok.View):
     
    534541    grok.require('waeup.viewApplication')
    535542    form_fields = grok.AutoFields(IApplicantOnlinePayment)
    536     #form_fields['creation_date'].custom_widget = FriendlyDateDisplayWidget('le')
    537     #form_fields['payment_date'].custom_widget = FriendlyDateDisplayWidget('le')
     543    form_fields['creation_date'].custom_widget = FriendlyDateDisplayWidget('le')
     544    form_fields['payment_date'].custom_widget = FriendlyDateDisplayWidget('le')
    538545    prefix = 'form'
    539546
  • main/waeup.kofa/trunk/src/waeup/kofa/payments/interfaces.py

    r8160 r8170  
    2020from waeup.kofa.interfaces import IKofaObject, SimpleKofaVocabulary
    2121from waeup.kofa.interfaces import MessageFactory as _
    22 from waeup.kofa.schema import FormattedDatetime
    2322
    2423payment_states = SimpleKofaVocabulary(
     
    6968        )
    7069
    71     creation_date = FormattedDatetime(
     70    creation_date = schema.Datetime(
    7271        title = _(u'Ticket Creation Date'),
    7372        readonly = False,
    7473        )
    7574
    76     payment_date = FormattedDatetime(
     75    payment_date = schema.Datetime(
    7776        title = _(u'Payment Date'),
    7877        required = False,
     
    188187        readonly = False,
    189188        )
    190 
    191 
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r8160 r8170  
    4545    IKofaUtils, IUniversity)
    4646from waeup.kofa.interfaces import MessageFactory as _
    47 from waeup.kofa.widgets.datewidget import FriendlyDateDisplayWidget
     47from waeup.kofa.widgets.datewidget import (
     48    FriendlyDateWidget, FriendlyDateDisplayWidget,
     49    FriendlyDatetimeDisplayWidget)
    4850from waeup.kofa.widgets.restwidget import ReSTDisplayWidget
    4951from waeup.kofa.widgets.phonewidget import PhoneWidget
     
    11141116    grok.require('waeup.viewStudent')
    11151117    form_fields = grok.AutoFields(IStudentOnlinePayment)
     1118    form_fields[
     1119        'creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
     1120    form_fields[
     1121        'payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
    11161122    pnav = 4
    11171123
     
    11801186    grok.require('waeup.viewStudent')
    11811187    form_fields = grok.AutoFields(IStudentOnlinePayment)
    1182     #form_fields['creation_date'].custom_widget = FriendlyDateDisplayWidget('le')
    1183     #form_fields['payment_date'].custom_widget = FriendlyDateDisplayWidget('le')
     1188    form_fields['creation_date'].custom_widget = FriendlyDateDisplayWidget('le')
     1189    form_fields['payment_date'].custom_widget = FriendlyDateDisplayWidget('le')
    11841190    prefix = 'form'
    11851191    title = 'Payment Data'
     
    13811387    grok.require('waeup.handleAccommodation')
    13821388    form_fields = grok.AutoFields(IBedTicket)
    1383     #form_fields['booking_date'].custom_widget = FriendlyDateDisplayWidget('le')
     1389    form_fields['booking_date'].custom_widget = FriendlyDateDisplayWidget('le')
    13841390    prefix = 'form'
    13851391
  • main/waeup.kofa/trunk/src/waeup/kofa/students/interfaces.py

    r8160 r8170  
    2424    IKofaObject, academic_sessions_vocab, validate_email, IKofaUtils)
    2525from waeup.kofa.interfaces import MessageFactory as _
    26 from waeup.kofa.schema import TextLineChoice, FormattedDate, FormattedDatetime
     26from waeup.kofa.schema import TextLineChoice, FormattedDate
    2727from waeup.kofa.students.vocabularies import (
    2828    StudyLevelSource, contextual_reg_num_source, contextual_mat_num_source,
     
    467467        )
    468468
    469     booking_date = FormattedDatetime(
     469    booking_date = schema.Datetime(
    470470        title = _(u'Booking Date'),
    471471        required = False,
Note: See TracChangeset for help on using the changeset viewer.