Ignore:
Timestamp:
3 Jul 2016, 14:09:30 (8 years ago)
Author:
Henrik Bettermann
Message:

Add referee entry components to be used for sending emails to referees elected by applicants.

Location:
main/waeup.kofa/trunk/src/waeup/kofa
Files:
1 added
3 edited

Legend:

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

    r13976 r14011  
    3434from waeup.kofa.payments.interfaces import IOnlinePayment
    3535from waeup.kofa.schema import PhoneNumber
     36from waeup.kofa.schoolgrades import ResultEntryField
     37from waeup.kofa.refereeentries import RefereeEntryField
    3638from waeup.kofa.students.vocabularies import GenderSource, RegNumberSource
    3739from waeup.kofa.university.vocabularies import (
     
    411413        )
    412414
    413     #school_grades = schema.List(
    414     #    title = _(u'School Grades'),
    415     #    value_type = ResultEntryField(),
    416     #    required = False,
    417     #    default = [],
    418     #    )
    419 
    420415    notice = schema.Text(
    421416        title = _(u'Notice'),
     
    444439        )
    445440
    446 class IApplicant(IApplicantBaseData):
     441class IApplicantTestData(IKofaObject):
     442    """This interface is for demonstration and test purposes only.
     443    It can be omitted in customized versions of Kofa.
     444    """
     445
     446    school_grades = schema.List(
     447        title = _(u'School Grades'),
     448        value_type = ResultEntryField(),
     449        required = False,
     450        defaultFactory=list,
     451        )
     452
     453    referees = schema.List(
     454        title = _(u'Referees'),
     455        value_type = RefereeEntryField(),
     456        required = False,
     457        defaultFactory=list,
     458        )
     459
     460IApplicantTestData['school_grades'].order = IApplicantBaseData['course2'].order
     461
     462class IApplicant(IApplicantBaseData, IApplicantTestData):
    447463    """This is basically the applicant base data. Here we repeat the
    448464    fields from base data if we have to set the `required` attribute
  • main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py

    r13886 r14011  
    273273    """
    274274
     275class IRefereeEntry(Interface):
     276    """A referee entry.
     277    """
     278    name = schema.TextLine(
     279        title = _(u'Name'),
     280        required = True,
     281        description = _(u'Name'),
     282        )
     283    email = schema.ASCIILine(
     284        title = _(u'Email Address'),
     285        default = None,
     286        required = True,
     287        constraint=validate_email,
     288        description = _(u'Email Address'),
     289        )
     290
     291class IRefereeEntryField(IObject):
     292    """A zope.schema-like field for usage in interfaces.
     293
     294    Marker interface to distuingish result entries from ordinary
     295    object fields. Needed for registration of widgets.
     296    """
     297
    275298class IKofaUtils(Interface):
    276299    """A collection of methods which are subject to customization.
     
    792815            ),
    793816        required = False,
    794         default = [],
     817        defaultFactory=list,
    795818        )
    796819
  • main/waeup.kofa/trunk/src/waeup/kofa/widgets/objectwidget.pt

    r7802 r14011  
    22  <span tal:define="error widget/error"
    33    tal:replace="structure error" tal:condition="error" />
     4  <span class="hint" tal:condition="widget/hint">
     5    <span tal:content="widget/hint" />:
     6  </span>
    47  <span tal:replace="structure widget" />
    58</span>
Note: See TracChangeset for help on using the changeset viewer.