Ignore:
Timestamp:
29 Nov 2013, 06:45:29 (11 years ago)
Author:
Henrik Bettermann
Message:

Add address fields.

Location:
main/kofacustom.ekodisco/trunk/src/kofacustom/ekodisco/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.ekodisco/trunk/src/kofacustom/ekodisco/students/browser.py

    r10804 r10809  
    2121from zope.component import getUtility
    2222from hurry.workflow.interfaces import IWorkflowInfo
     23from zope.formlib.textwidgets import BytesDisplayWidget
    2324from waeup.kofa.interfaces import REQUESTED, IExtFileStore, IKofaUtils
    2425from waeup.kofa.widgets.datewidget import FriendlyDatetimeDisplayWidget
     
    3637from kofacustom.nigeria.students.browser import (
    3738    NigeriaOnlinePaymentDisplayFormPage,
     39    NigeriaStudentBaseDisplayFormPage,
    3840    NigeriaStudentBaseManageFormPage,
     41    NigeriaStudentBaseEditFormPage,
    3942    NigeriaStudentClearanceEditFormPage,
    4043    NigeriaOnlinePaymentAddFormPage,
     
    4649    ICustomStudentOnlinePayment, ICustomStudentStudyCourse,
    4750    ICustomStudentStudyLevel, ICustomStudentStudyCourse,
    48     ICustomStudentStudyCourse)
     51    ICustomStudentStudyCourse, ICustomStudentBase)
    4952from kofacustom.ekodisco.interfaces import MessageFactory as _
     53
     54class CustomStudentBaseDisplayFormPage(NigeriaStudentBaseDisplayFormPage):
     55    """ Page to display student base data
     56    """
     57    form_fields = grok.AutoFields(ICustomStudentBase).omit(
     58        'password', 'suspended', 'suspended_comment')
     59    form_fields['perm_address'].custom_widget = BytesDisplayWidget
     60
     61class CustomStudentBaseManageFormPage(NigeriaStudentBaseManageFormPage):
     62    """ View to manage student base data
     63    """
     64    form_fields = grok.AutoFields(ICustomStudentBase).omit(
     65        'student_id', 'adm_code', 'suspended')
     66
     67#class CustomStudentBaseEditFormPage(NigeriaStudentBaseEditFormPage):
     68#    """ View to edit student base data
     69#    """
     70#    form_fields = grok.AutoFields(ICustomStudentBase).select(
     71#        'email', 'phone')
     72
     73
     74
     75
    5076
    5177
     
    5783
    5884    form_fields = grok.AutoFields(ICustomStudentStudyCourse).select(
    59                 'certificate', 'entry_session', 'current_session')
     85                'certificate', 'entry_session', 'current_session',
     86                'service_address')
     87    form_fields['service_address'].custom_widget = BytesDisplayWidget
    6088
    6189class CustomStudyCourseManageFormPage(StudyCourseManageFormPage):
     
    6694
    6795    form_fields = grok.AutoFields(ICustomStudentStudyCourse).select(
    68                 'certificate', 'entry_session', 'current_session')
     96                'certificate', 'entry_session', 'current_session',
     97                'service_address')
  • main/kofacustom.ekodisco/trunk/src/kofacustom/ekodisco/students/interfaces.py

    r10770 r10809  
    3232    """
    3333
     34    perm_address = schema.Text(
     35        title = _(u'Customer Address'),
     36        required = False,
     37        )
     38
    3439class ICustomStudentPersonal(INigeriaStudentPersonal):
    3540    """Student personal data.
     
    5863
    5964    """
     65
     66    service_address = schema.Text(
     67        title = _(u'Service Address'),
     68        required = False,
     69        )
    6070
    6171class ICustomStudentStudyLevel(INigeriaStudentStudyLevel):
Note: See TracChangeset for help on using the changeset viewer.