Ignore:
Timestamp:
15 Jan 2014, 10:17:30 (11 years ago)
Author:
Henrik Bettermann
Message:

Add field programme_type and make date_of_birth compulsory.

File:
1 edited

Legend:

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

    r10311 r10924  
    4343from waeup.aaue.payments.interfaces import ICustomOnlinePayment
    4444
     45programme_types_vocab = SimpleKofaVocabulary(
     46    (_('5-Year Undergraduate Programme'), 'regular'),
     47    (_('4-Year Undergraduate Programme (Direct Entry)'), 'direct'),
     48    (_('not applicable'), 'na'),
     49    )
     50
    4551class ICustomUGApplicant(IApplicantBaseData):
    4652    """An undergraduate applicant.
     
    5056    adding them to the UG_OMIT* tuples.
    5157    """
     58
     59    programme_type = schema.Choice(
     60        title = _(u'Programme Type'),
     61        vocabulary = programme_types_vocab,
     62        required = True,
     63        )
    5264
    5365    nationality = schema.Choice(
     
    213225            raise Invalid(_("2nd choice course must differ from 1st choice course."))
    214226
     227ICustomUGApplicant['programme_type'].order = IApplicantBaseData[
     228    'reg_number'].order
     229
    215230class ICustomPGApplicant(INigeriaPGApplicant):
    216231    """A postgraduate applicant.
     
    252267    """
    253268
     269    date_of_birth = FormattedDate(
     270        title = _(u'Date of Birth'),
     271        required = True,
     272        show_year = True,
     273        )
     274
     275ICustomUGApplicantEdit['date_of_birth'].order = ICustomUGApplicant[
     276    'date_of_birth'].order
     277
    254278class ICustomPGApplicantEdit(INigeriaPGApplicantEdit):
    255279    """A postgraduate applicant interface for editing.
Note: See TracChangeset for help on using the changeset viewer.