Ignore:
Timestamp:
9 Apr 2012, 10:57:31 (13 years ago)
Author:
Henrik Bettermann
Message:

Customize PhoneWidget?.

Location:
main/waeup.uniben/trunk/src/waeup/uniben
Files:
3 added
2 edited

Legend:

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

    r8053 r8076  
    2222    FriendlyDateWidget, FriendlyDateDisplayWidget,
    2323    FriendlyDatetimeDisplayWidget)
    24 from waeup.kofa.widgets.phonewidget import PhoneWidget
     24from waeup.uniben.widgets.phonewidget import PhoneWidget
    2525from waeup.kofa.applicants.browser import (ApplicantDisplayFormPage,
    2626    OnlinePaymentCallbackPage, ExportPDFPage,
  • main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py

    r8020 r8076  
    2525    StudentClearanceManageFormPage, StudentClearanceEditFormPage,
    2626    StudentClearanceDisplayFormPage, OnlinePaymentCallbackPage,
    27     ExportPDFClearanceSlipPage)
     27    ExportPDFClearanceSlipPage, StudentBaseManageFormPage,
     28    StudentBaseEditFormPage)
    2829from waeup.kofa.students.viewlets import RequestCallbackActionButton
    2930from waeup.uniben.students.interfaces import (
    30     IStudent, IStudentPersonal,
     31    IStudentBase, IStudent, IStudentPersonal,
    3132    IUGStudentClearance,IPGStudentClearance,
    3233    )
    3334from waeup.uniben.interfaces import MessageFactory as _
     35from waeup.uniben.widgets.phonewidget import PhoneWidget
    3436
    3537class RequestCallbackActionButton(RequestCallbackActionButton):
     
    4547    def update(self):
    4648        return
     49
     50class StudentBaseManageFormPage(StudentBaseManageFormPage):
     51    """ View to manage student base data
     52    """
     53    form_fields = grok.AutoFields(IStudentBase).omit('student_id')
     54    form_fields['phone'].custom_widget = PhoneWidget
     55
     56class StudentBaseEditFormPage(StudentBaseEditFormPage):
     57    """ View to edit student base data
     58    """
     59    form_fields = grok.AutoFields(IStudentBase).select(
     60        'email', 'phone')
     61    form_fields['phone'].custom_widget = PhoneWidget
     62
    4763
    4864class StudentPersonalDisplayFormPage(StudentPersonalDisplayFormPage):
Note: See TracChangeset for help on using the changeset viewer.