Ignore:
Timestamp:
17 Aug 2022, 15:53:06 (2 years ago)
Author:
Henrik Bettermann
Message:

Make most UG application fields required.

File:
1 edited

Legend:

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

    r16958 r17066  
    657657    """
    658658
     659    middlename = schema.TextLine(
     660        title = _(u'Middle Name'),
     661        required = True,
     662        )
    659663    phone = PhoneNumber(
    660664        title = _(u'Phone'),
     
    668672        required = True,
    669673        )
     674    subtype = schema.Choice(
     675        title = _(u'Application Subtype'),
     676        vocabulary = subtype_vocab,
     677        required = True,
     678        )       
    670679    date_of_birth = FormattedDate(
    671680        title = _(u'Date of Birth'),
     
    673682        show_year = True,
    674683        )
    675 
     684    nationality = schema.Choice(
     685        source = nats_vocab,
     686        title = _(u'Nationality'),
     687        required = True,
     688        )
    676689    parents_name = schema.TextLine(
    677690        title = _(u'Full Name'),
     
    679692        readonly = False,
    680693        )
    681 
    682694    parents_email = schema.ASCIILine(
    683695        title = _(u'Email Address'),
     
    685697        constraint=validate_email,
    686698        )
    687 
    688699    parents_phone = PhoneNumber(
    689700        title = _(u'Phone'),
    690701        required = True,
    691702        )
    692 
     703    course1 = schema.Choice(
     704        title = _(u'1st Choice Course of Study'),
     705        source = AppCatCertificateSource(),
     706        required = True,
     707        )
     708    course2 = schema.Choice(
     709        title = _(u'2nd Choice Course of Study'),
     710        source = AppCatCertificateSource(),
     711        required = False,
     712        )
    693713    fst_sit_fname = schema.TextLine(
    694714        title = _(u'Full Name'),
    695         description = _(u'As it is written on your WAEC/NECO result.'),
    696         required = False,
    697         readonly = False,
    698         )
    699 
     715        required = True,
     716        readonly = False,
     717        )
     718    fst_sit_no = schema.TextLine(
     719        title = _(u'Exam Number'),
     720        required = True,
     721        readonly = False,
     722        )
     723    fst_sit_date = FormattedDate(
     724        title = _(u'Exam Date'),
     725        required = True,
     726        readonly = False,
     727        show_year = True,
     728        )
     729    fst_sit_type = schema.Choice(
     730        title = _(u'Exam Type'),
     731        required = True,
     732        readonly = False,
     733        vocabulary = exam_types,
     734        )
     735    fst_sit_results = schema.List(
     736        title = _(u'Exam Results'),
     737        value_type = ResultEntryField(),
     738        required = True,
     739        readonly = False,
     740        defaultFactory=list,
     741        )
    700742    scd_sit_fname = schema.TextLine(
    701743        title = _(u'Full Name'),
    702         description = _(u'As it is written on your WAEC/NECO result.'),
    703         required = False,
    704         readonly = False,
    705         )
    706 
     744        required = True,
     745        readonly = False,
     746        )
     747    scd_sit_no = schema.TextLine(
     748        title = _(u'Exam Number'),
     749        required = True,
     750        readonly = False,
     751        )
     752    scd_sit_date = FormattedDate(
     753        title = _(u'Exam Date'),
     754        required = True,
     755        readonly = False,
     756        show_year = True,
     757        )
     758    scd_sit_type = schema.Choice(
     759        title = _(u'Exam Type'),
     760        required = True,
     761        readonly = False,
     762        vocabulary = exam_types,
     763        )
     764    scd_sit_results = schema.List(
     765        title = _(u'Exam Results'),
     766        value_type = ResultEntryField(),
     767        required = True,
     768        readonly = False,
     769        defaultFactory=list,
     770        )
     771    hq_type = schema.Choice(
     772        title = _(u'Qualification Obtained'),
     773        required = False,
     774        readonly = False,
     775        vocabulary = high_qual,
     776        )
     777    hq_matric_no = schema.TextLine(
     778        title = _(u'Former Matric Number'),
     779        required = False,
     780        readonly = False,
     781        )
     782    hq_degree = schema.Choice(
     783        title = _(u'Class of Degree'),
     784        required = False,
     785        readonly = False,
     786        vocabulary = high_grade,
     787        )
     788    hq_school = schema.TextLine(
     789        title = _(u'Institution Attended'),
     790        required = False,
     791        readonly = False,
     792        )
     793    hq_session = schema.TextLine(
     794        title = _(u'Years Attended'),
     795        required = False,
     796        readonly = False,
     797        )
     798    hq_disc = schema.TextLine(
     799        title = _(u'Discipline'),
     800        required = False,
     801        readonly = False,
     802        )
    707803    jamb_fname = schema.TextLine(
    708804        title = _(u'Full Name'),
     
    711807        readonly = False,
    712808        )
    713 
     809    jamb_subjects_list = schema.List(
     810        title = _(u'JAMB Subjects'),
     811        required = True,
     812        defaultFactory=list,
     813        value_type = schema.Choice(
     814            vocabulary = jambsubjects
     815            #source = JAMBSubjectSource(),
     816            ),
     817        )
    714818    jamb_score = schema.Int(
    715819        title = _(u'Total JAMB Score'),
    716         required = False,
     820        required = True,
    717821        )
    718822
    719823    jamb_reg_number = schema.TextLine(
    720824        title = _(u'JAMB Registration Number'),
    721         required = False,
     825        required = True,
    722826        # constraint=validate_jamb_reg_number_2, # temporarily in 2021
    723827        constraint=validate_jamb_reg_number_3,
     
    725829        )
    726830
     831ICustomUGApplicantEdit[
     832    'middlename'].order = ICustomUGApplicant['middlename'].order
     833ICustomUGApplicantEdit[
     834    'nationality'].order = ICustomUGApplicant['nationality'].order
    727835ICustomUGApplicantEdit[
    728836    'date_of_birth'].order = ICustomUGApplicant['date_of_birth'].order
     
    730838    'email'].order = ICustomUGApplicant['email'].order
    731839ICustomUGApplicantEdit[
     840    'subtype'].order = ICustomUGApplicant['subtype'].order
     841ICustomUGApplicantEdit[
    732842    'phone'].order =  ICustomUGApplicantEdit['email'].order
    733 ICustomUGApplicantEdit[
    734     'fst_sit_fname'].order =  ICustomUGApplicant['fst_sit_fname'].order
    735 ICustomUGApplicantEdit[
    736     'scd_sit_fname'].order =  ICustomUGApplicant['scd_sit_fname'].order
    737 ICustomUGApplicantEdit[
    738     'jamb_fname'].order =  ICustomUGApplicant['jamb_fname'].order
    739 ICustomUGApplicantEdit[
    740     'jamb_score'].order =  ICustomUGApplicant['jamb_score'].order
    741 ICustomUGApplicantEdit[
    742     'jamb_reg_number'].order =  ICustomUGApplicant['jamb_reg_number'].order
    743 ICustomUGApplicantEdit[
    744     'parents_name'].order =  ICustomUGApplicant['parents_name'].order
    745 ICustomUGApplicantEdit[
    746     'parents_email'].order =  ICustomUGApplicant['parents_email'].order
    747 ICustomUGApplicantEdit[
    748     'parents_phone'].order =  ICustomUGApplicant['parents_phone'].order
     843
    749844
    750845class ICustomPGApplicantEdit(ICustomPGApplicant):
     
    767862    email = TextLineChoice(
    768863        title = _(u'Email Address'),
    769         required = False,
     864        required = True,
    770865        constraint=validate_email,
    771866        source = contextual_email_source,
Note: See TracChangeset for help on using the changeset viewer.