Ignore:
Timestamp:
4 Sep 2015, 08:04:03 (9 years ago)
Author:
Henrik Bettermann
Message:

Make more fields required.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.wdu/trunk/src/kofacustom/wdu/applicants/interfaces.py

    r12888 r13240  
    2626from waeup.kofa.interfaces import (
    2727    SimpleKofaVocabulary, academic_sessions_vocab, validate_email)
    28 from waeup.kofa.schema import FormattedDate, TextLineChoice
     28from waeup.kofa.schema import FormattedDate, TextLineChoice, PhoneNumber
    2929from waeup.kofa.students.vocabularies import nats_vocab, GenderSource
    3030from waeup.kofa.applicants.interfaces import contextual_reg_num_source
     
    5050        title = _(u'Sex'),
    5151        source = GenderSource(),
    52         required = False,
     52        required = True,
    5353        )
    5454    marit_stat = schema.Choice(
    5555        title = u'Maritual Status',
    56         required = False,
     56        required = True,
    5757        vocabulary = SimpleKofaVocabulary(
    5858            (_('Single'), 'single'),
     
    6969    lga = schema.Choice(
    7070        source = LGASource(),
    71         title = _(u'State/LGA (Nigerians only)'),
    72         required = False,
     71        title = _(u'State/LGA'),
     72        description = _("Select 'Foreigner' if not a Nigerian."),
     73        required = True,
    7374        )
    7475    religion = schema.Choice(
     
    247248    jamb_subjects = schema.Text(
    248249        title = _(u'Subjects and Scores'),
    249         description = _(u'(one subject with score per line)'),
     250        description = _(u'One subject with score per line.'),
    250251        required = False,
    251252        )
     
    343344    """
    344345
     346    email = schema.ASCIILine(
     347        title = _(u'Email Address'),
     348        required = True,
     349        constraint=validate_email,
     350        )
     351    date_of_birth = FormattedDate(
     352        title = _(u'Date of Birth'),
     353        required = True,
     354        show_year = True,
     355        )
     356    phone = PhoneNumber(
     357        title = _(u'Phone'),
     358        description = u'',
     359        required = True,
     360        )
     361
     362ICustomUGApplicantEdit['email'].order = ICustomUGApplicant['email'].order
     363ICustomUGApplicantEdit['date_of_birth'].order = ICustomUGApplicant['date_of_birth'].order
     364ICustomUGApplicantEdit['phone'].order = ICustomUGApplicant['phone'].order
     365
    345366class ICustomPGApplicantEdit(INigeriaPGApplicantEdit):
    346367    """A postgraduate applicant interface for editing.
     
    372393    """
    373394
     395    email = schema.ASCIILine(
     396        title = _(u'Email Address'),
     397        required = True,
     398        constraint=validate_email,
     399        )
     400    date_of_birth = FormattedDate(
     401        title = _(u'Date of Birth'),
     402        required = True,
     403        show_year = True,
     404        )
     405    phone = PhoneNumber(
     406        title = _(u'Phone'),
     407        description = u'',
     408        required = True,
     409        )
     410
     411ICustomPUTMEApplicantEdit['email'].order = ICustomUGApplicant['email'].order
     412ICustomPUTMEApplicantEdit['date_of_birth'].order = ICustomUGApplicant['date_of_birth'].order
     413ICustomPUTMEApplicantEdit['phone'].order = ICustomUGApplicant['phone'].order
     414
    374415class ICustomApplicantUpdateByRegNo(INigeriaApplicantUpdateByRegNo):
    375416    """Representation of an applicant.
Note: See TracChangeset for help on using the changeset viewer.