Ignore:
Timestamp:
9 Apr 2012, 12:42:52 (13 years ago)
Author:
Henrik Bettermann
Message:

Use customized PhoneWidget? for applicants and regular users.

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

Legend:

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

    r8076 r8080  
    101101        form_fields['student_id'].for_display = True
    102102        form_fields['applicant_id'].for_display = True
    103         form_fields['phone'].custom_widget = PhoneWidget
    104103        return form_fields
    105104
  • main/waeup.uniben/trunk/src/waeup/uniben/browser/pages.py

    r8020 r8080  
    1919from waeup.kofa.browser.pages import (
    2020    SessionConfigurationAddFormPage, SessionConfigurationManageFormPage)
     21from waeup.kofa.interfaces import IUserAccount
    2122from waeup.uniben.interfaces import (
    2223    ISessionConfiguration, ISessionConfigurationAdd)
     24from waeup.kofa.browser.pages import (
     25    UserEditFormPage, UserManageFormPage, AddUserFormPage)
     26from waeup.uniben.widgets.phonewidget import PhoneWidget
    2327
    2428class SessionConfigurationAddFormPage(SessionConfigurationAddFormPage):
     
    3135    """
    3236    form_fields = grok.AutoFields(ISessionConfiguration)
     37
     38class AddUserFormPage(AddUserFormPage):
     39    """Add a user account.
     40    """
     41    form_fields = grok.AutoFields(IUserAccount)
     42    form_fields['phone'].custom_widget = PhoneWidget
     43
     44class UserManageFormPage(UserManageFormPage):
     45    """Manage a user account.
     46    """
     47    form_fields = grok.AutoFields(IUserAccount).omit('name')
     48    form_fields['phone'].custom_widget = PhoneWidget
     49
     50class UserEditFormPage(UserEditFormPage):
     51    """Edit a user account by user
     52    """
     53    form_fields = grok.AutoFields(IUserAccount).omit(
     54        'name', 'description', 'roles')
     55    form_fields['phone'].custom_widget = PhoneWidget
Note: See TracChangeset for help on using the changeset viewer.