Changeset 10684 for main


Ignore:
Timestamp:
2 Nov 2013, 08:50:58 (11 years ago)
Author:
Henrik Bettermann
Message:

We do not need IFacultyAdd. A simple omit('code') does the same job.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/interfaces.py

    r9948 r10684  
    2424from waeup.kofa.interfaces import MessageFactory as _
    2525from waeup.kofa.university.interfaces import (
    26     IFacultiesContainer, IFaculty, IFacultyAdd, IDepartment, IDepartmentAdd,
     26    IFacultiesContainer, IFaculty, IDepartment, IDepartmentAdd,
    2727    ICoursesContainer, ICourse, ICourseAdd, ICertificatesContainer,
    2828    ICertificate, ICertificateAdd, ICertificateCourse, ICertificateCourseAdd)
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py

    r10676 r10684  
    4646    KofaDisplayFormPage, NullValidator)
    4747from waeup.kofa.browser.interfaces import (
    48     IUniversity, IFacultiesContainer, IFaculty, IFacultyAdd,
     48    IUniversity, IFacultiesContainer, IFaculty,
    4949    IDepartment, IDepartmentAdd, ICourse, ICourseAdd, ICertificate,
    5050    ICertificateAdd, ICertificateCourse, ICertificateCourseAdd,
     
    17481748    grok.name('add')
    17491749    label = _('Add faculty')
    1750     form_fields = grok.AutoFields(IFacultyAdd)
     1750    form_fields = grok.AutoFields(IFaculty)
    17511751    pnav = 1
    17521752
     
    18001800    tabthreeactions2 = [_('Add local role')]
    18011801
    1802     form_fields = grok.AutoFields(IFaculty)
     1802    form_fields = grok.AutoFields(IFaculty).omit('code')
    18031803
    18041804    @property
  • main/waeup.kofa/trunk/src/waeup/kofa/university/faculty.py

    r10650 r10684  
    2525from waeup.kofa.interfaces import IKofaUtils
    2626from waeup.kofa.university.interfaces import (
    27     IFaculty, IFacultyAdd, IDepartment)
     27    IFaculty, IDepartment)
    2828
    2929def longtitle(inst):
     
    3838    """A university faculty.
    3939    """
    40     grok.implements(IFaculty, IFacultyAdd)
     40    grok.implements(IFaculty)
    4141
    4242    local_roles = [
  • main/waeup.kofa/trunk/src/waeup/kofa/university/interfaces.py

    r10650 r10684  
    3939        default = u'NA',
    4040        required = True,
    41         readonly = True,
    4241        )
    4342
     
    5554        )
    5655
    57 
    58 class IFacultyAdd(IFaculty):
    59     """Representation of a university faculty.
    60     """
    61     code = schema.TextLine(
    62         title = _(u'Code'),
    63         description = _(u'This code will become part of the URL.'),
    64         default = u'NA',
    65         required = True,
    66         readonly = False,
    67         )
    68 
    69 IFacultyAdd['code'].order =  IFaculty['code'].order
    7056
    7157class IFacultiesContainer(IKofaContainer):
Note: See TracChangeset for help on using the changeset viewer.