Changeset 10786 for main


Ignore:
Timestamp:
21 Nov 2013, 17:03:43 (11 years ago)
Author:
Henrik Bettermann
Message:

Customize some form pages.

File:
1 edited

Legend:

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

    r10770 r10786  
    1919from waeup.kofa.browser.pages import (
    2020    SessionConfigurationAddFormPage, SessionConfigurationManageFormPage,
    21     LoginPage, CertificatePage, CertificateManageFormPage)
    22 from waeup.kofa.university.interfaces import ICertificate
     21    LoginPage, CertificatePage, CertificateManageFormPage,
     22    CertificateAddFormPage,
     23    CoursePage, CourseAddFormPage, CourseManageFormPage)
     24from waeup.kofa.university.interfaces import ICertificate, ICourse
    2325from kofacustom.ekodisco.interfaces import (
    2426    ICustomSessionConfiguration, ICustomSessionConfigurationAdd)
     
    3436    form_fields = grok.AutoFields(ICustomSessionConfiguration)
    3537
     38class CustomCourseAddFormPage(CourseAddFormPage):
     39    """Add-form to add course to a department.
     40    """
     41    form_fields = grok.AutoFields(ICourse).select('title', 'code')
     42
     43class CustomCoursePage(CoursePage):
     44    """Course index page.
     45    """
     46    form_fields = grok.AutoFields(ICourse).select('title', 'code')
     47
     48class CustomCourseManageFormPage(CourseManageFormPage):
     49    """Edit form page for courses.
     50    """
     51
     52    form_fields = grok.AutoFields(ICourse).select('title')
     53
     54class CustomCertificateAddFormPage(CertificateAddFormPage):
     55    """Add-form to add Certificate to a department.
     56    """
     57    form_fields = grok.AutoFields(ICertificate).select(
     58        'title', 'code', 'application_category')
     59
     60class CustomCertificatePage(CertificatePage):
     61    """Certificate index page.
     62    """
     63    form_fields = grok.AutoFields(ICertificate).select(
     64        'title', 'code', 'application_category')
     65
     66class CustomCertificateManageFormPage(CertificateManageFormPage):
     67    """Edit form page for Certificates.
     68    """
     69
     70    form_fields = grok.AutoFields(ICertificate).select(
     71        'title', 'application_category')
Note: See TracChangeset for help on using the changeset viewer.