Ignore:
Timestamp:
14 Apr 2015, 12:01:57 (9 years ago)
Author:
Henrik Bettermann
Message:

Add parent_email. This field is only editable by managers.

File:
1 edited

Legend:

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

    r12855 r12856  
    1919from zope.i18n import translate
    2020from zope.schema.interfaces import ConstraintNotSatisfied
     21from zope.formlib.textwidgets import BytesDisplayWidget
    2122from zope.component import getUtility
    2223from hurry.workflow.interfaces import IWorkflowInfo
     
    4445    NigeriaExportPDFPaymentSlipPage,
    4546    NigeriaExportPDFClearanceSlipPage,
     47    NigeriaStudentPersonalDisplayFormPage,
     48    NigeriaStudentPersonalManageFormPage
    4649    )
    4750
    4851from waeup.uniben.students.interfaces import (
    4952    ICustomStudent,
    50     ICustomStudentOnlinePayment, ICustomStudentStudyCourse,
     53    ICustomStudentOnlinePayment,
     54    ICustomStudentStudyCourse,
    5155    ICustomStudentStudyLevel,
    5256    ICustomUGStudentClearance,
    53     ICustomPGStudentClearance)
     57    ICustomPGStudentClearance,
     58    ICustomStudentPersonal)
    5459from waeup.uniben.interfaces import MessageFactory as _
    5560
     
    203208            omit_fields=self.omit_fields,
    204209            note=self.note)
     210
     211class CustomStudentPersonalDisplayFormPage(
     212    NigeriaStudentPersonalDisplayFormPage):
     213    """ Page to display student personal data
     214    """
     215
     216    form_fields = grok.AutoFields(ICustomStudentPersonal)
     217    form_fields['perm_address'].custom_widget = BytesDisplayWidget
     218    form_fields['next_kin_address'].custom_widget = BytesDisplayWidget
     219    form_fields[
     220        'personal_updated'].custom_widget = FriendlyDatetimeDisplayWidget('le')
     221
     222class CustomStudentPersonalManageFormPage(
     223    NigeriaStudentPersonalManageFormPage):
     224    """ Page to manage personal data
     225    """
     226
     227    form_fields = grok.AutoFields(ICustomStudentPersonal)
     228    form_fields['personal_updated'].for_display = True
     229    form_fields[
     230        'personal_updated'].custom_widget = FriendlyDatetimeDisplayWidget('le')
    205231
    206232class StudyCourseCOEditFormPage(KofaEditFormPage):
Note: See TracChangeset for help on using the changeset viewer.