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

Customize PhoneWidget?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.