Changeset 17712


Ignore:
Timestamp:
8 Mar 2024, 11:04:44 (10 months ago)
Author:
Henrik Bettermann
Message:

Customize application form

Location:
main/kofacustom.udss/trunk/src/kofacustom/udss
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.udss/trunk/src/kofacustom/udss/applicants/browser.py

    r17711 r17712  
    4343from kofacustom.udss.interfaces import MessageFactory as _
    4444
    45 OMIT_DISPLAY_FIELDS = ('locked', 'course_admitted',
    46     'result_uploaded', 'suspended', 'special_application',)
     45OMIT_DISPLAY_FIELDS = ('locked', 'suspended',)
    4746
    48 UG_OMIT_DISPLAY_FIELDS = OMIT_DISPLAY_FIELDS + (
    49     'programme_type', 'course1', 'course2', 'course_admitted')
    50 UG_OMIT_PDF_FIELDS = UG_OMIT_DISPLAY_FIELDS + ('phone',)
    51 UG_OMIT_MANAGE_FIELDS = (
    52     'special_application',
    53     'programme_type', 'course1', 'course2', 'course_admitted')
     47UG_OMIT_DISPLAY_FIELDS = OMIT_DISPLAY_FIELDS + ()
     48UG_OMIT_PDF_FIELDS = UG_OMIT_DISPLAY_FIELDS
     49UG_OMIT_MANAGE_FIELDS = ()
    5450UG_OMIT_EDIT_FIELDS = UG_OMIT_MANAGE_FIELDS + OMIT_DISPLAY_FIELDS + (
    5551    'student_id',
    56     'notice',
    57     'jamb_age',
    58     'jamb_subjects',
    59     'jamb_score',
    60     'jamb_reg_number',
    61     'aggregate')
     52    'notice')
    6253
    6354class CustomApplicantDisplayFormPage(ApplicantDisplayFormPage):
     
    8778
    8879    def _reduced_slip(self):
    89         return getattr(self.context, 'result_uploaded', False)
     80        return False
    9081
    9182    @property
  • main/kofacustom.udss/trunk/src/kofacustom/udss/applicants/interfaces.py

    r17711 r17712  
    2525from waeup.kofa.schoolgrades import ResultEntryField
    2626from waeup.kofa.interfaces import (
    27     SimpleKofaVocabulary, academic_sessions_vocab, validate_email)
    28 from waeup.kofa.schema import FormattedDate, TextLineChoice
     27    SimpleKofaVocabulary, academic_sessions_vocab, validate_email,
     28    IKofaObject)
     29from waeup.kofa.schema import FormattedDate, TextLineChoice, PhoneNumber
    2930from waeup.kofa.students.vocabularies import nats_vocab, GenderSource
    3031from waeup.kofa.applicants.interfaces import (
     
    3738from kofacustom.udss.payments.interfaces import ICustomOnlinePayment
    3839
    39 class ICustomUGApplicant(IApplicantBaseData):
    40     """An undergraduate applicant.
    41 
    42     This interface defines the least common multiple of all fields
    43     in ug application forms. In customized forms, fields can be excluded by
    44     adding them to the UG_OMIT* tuples.
    45     """
    46 
     40class ICustomUGApplicant(IKofaObject):
     41    """A pupil.
     42
     43    """
     44
     45    suspended = schema.Bool(
     46        title = _(u'Account suspended'),
     47        default = False,
     48        required = False,
     49        )
     50
     51    applicant_id = schema.TextLine(
     52        title = _(u'Applicant Id'),
     53        required = False,
     54        readonly = False,
     55        )
     56
     57    reg_number = TextLineChoice(
     58        title = _(u'Registration Number'),
     59        readonly = False,
     60        required = False,
     61        source = contextual_reg_num_source,
     62        )
     63
     64    firstname = schema.TextLine(
     65        title = _(u'First Name'),
     66        required = True,
     67        )
     68
     69    middlename = schema.TextLine(
     70        title = _(u'Middle Name'),
     71        required = False,
     72        )
     73
     74    lastname = schema.TextLine(
     75        title = _(u'Last Name (Surname)'),
     76        required = True,
     77        )
     78
     79    date_of_birth = FormattedDate(
     80        title = _(u'Date of Birth'),
     81        required = False,
     82        show_year = True,
     83        )
     84
     85    sex = schema.Choice(
     86        title = _(u'Gender'),
     87        source = GenderSource(),
     88        required = True,
     89        )
     90    nationality = schema.Choice(
     91        source = nats_vocab,
     92        title = _(u'Nationality'),
     93        required = False,
     94        )
     95    religion = schema.Choice(
     96        title = u'Religion',
     97        default = 'no_say',
     98        required = False,
     99        vocabulary = SimpleKofaVocabulary(
     100            (_('Muslim'), 'muslim'),
     101            (_('Christian'), 'christian'),
     102            (_('Others'), 'others'),
     103            (_('Prefer not to say'), 'no_say'),)
     104        )
     105    email = schema.ASCIILine(
     106        title = _(u'Email Address'),
     107        required = False,
     108        constraint=validate_email,
     109        )
     110    phone = PhoneNumber(
     111        title = _(u'Phone'),
     112        description = u'',
     113        required = False,
     114        )
     115    recent_schools_comment = schema.Text(
     116        title = _(u'Recent Schools Attended (with dates)'),
     117        required = False,
     118        )
     119    present_class_comment = schema.Text(
     120        title = _(u'Child\'s Present Class'),
     121        description = u'Indicate the child\'s present class. Please attach a copy of the first term result of the present class. Children in Basic Four or less than 10yrs by October should not apply.',
     122        required = False,
     123        )
     124    handicapped_comment = schema.Text(
     125        title = _(u'Health Problems'),
     126        description = u'Does the child has any special health problem or handicap? If yes, give details.',
     127        required = False,
     128        )
     129    bloodgroup = schema.TextLine(
     130        title = _(u'Blood Group'),
     131        required = False,
     132        )
     133    genotype = schema.TextLine(
     134        title = _(u'Genotype'),
     135        required = False,
     136        )
     137    notice = schema.Text(
     138        title = _(u'Notice'),
     139        required = False,
     140        )
     141    student_id = schema.TextLine(
     142        title = _(u'Student Id'),
     143        required = False,
     144        readonly = False,
     145        )
     146    locked = schema.Bool(
     147        title = _(u'Form locked'),
     148        default = False,
     149        required = False,
     150        )
     151
     152
     153    father_firstname = schema.TextLine(
     154        title = _(u'First Name of Father'),
     155        required = False,
     156        )
     157    father_middlename = schema.TextLine(
     158        title = _(u'Middle Name of Father'),
     159        required = False,
     160        )
     161    father_lastname = schema.TextLine(
     162        title = _(u'Last Name (Surname) of Father'),
     163        required = False,
     164        )
     165    father_status = schema.TextLine(
     166        title = _(u'Father\'s Status and Rank'),
     167        required = False,
     168        )
     169    father_employer = schema.TextLine(
     170        title = _(u'Father\'s Employer'),
     171        required = False,
     172        )
     173    father_res_address = schema.Text(
     174        title = _(u'Father\'s Residential Address'),
     175        required = False,
     176        )
     177    father_contact_address = schema.Text(
     178        title = _(u'Father\'s Contact Address (incl. P.O. Box)'),
     179        required = False,
     180        )
     181
     182    mother_firstname = schema.TextLine(
     183        title = _(u'First Name of Mother'),
     184        required = False,
     185        )
     186    mother_middlename = schema.TextLine(
     187        title = _(u'Middle Name of Mother'),
     188        required = False,
     189        )
     190    mother_lastname = schema.TextLine(
     191        title = _(u'Last Name (Surname) of Mother'),
     192        required = False,
     193        )
     194    mother_status = schema.TextLine(
     195        title = _(u'Mother\'s Status and Rank'),
     196        required = False,
     197        )
     198    mother_employer = schema.TextLine(
     199        title = _(u'Mother\'s Employer'),
     200        required = False,
     201        )
     202    mother_res_address = schema.Text(
     203        title = _(u'Mother\'s Residential Address'),
     204        required = False,
     205        )
     206    mother_contact_address = schema.Text(
     207        title = _(u'Mother\'s Contact Address (incl. P.O. Box)'),
     208        required = False,
     209        )
    47210
    48211class ICustomApplicant(ICustomUGApplicant):
     
    87250        show_year = True,
    88251        )
     252ICustomUGApplicantEdit[
     253    'date_of_birth'].order = ICustomUGApplicant['date_of_birth'].order
     254ICustomUGApplicantEdit[
     255    'email'].order = ICustomUGApplicant['email'].order
    89256
    90257class ICustomApplicantOnlinePayment(INigeriaApplicantOnlinePayment):
  • main/kofacustom.udss/trunk/src/kofacustom/udss/applicants/utils.py

    r17711 r17712  
    3333        'app': ['General Application', 'APP'],
    3434        }
     35
     36    SEPARATORS_DICT = {
     37        'form.applicant_id': 'Personal Data of the Child',
     38        'form.notice': 'Application Process Information',
     39        'form.father_firstname': 'Personal Data of Parents/Guardians',
     40        }
  • main/kofacustom.udss/trunk/src/kofacustom/udss/locales/en/LC_MESSAGES/waeup.kofa.po

    r17690 r17712  
    8888msgstr "Arm Officer 4"
    8989
    90 
    9190msgid "Pre-Studies"
    9291msgstr ""
     
    118117msgid "900 (Year 9)"
    119118msgstr "900 (n/a)"
     119
     120msgid "Base Data"
     121msgstr "Child Base Data"
     122
     123msgid "I confirm that the Passport Photograph uploaded on this form is a true picture of me."
     124msgstr "I confirm that the Passport Photograph uploaded on this form is a true picture of the child."
Note: See TracChangeset for help on using the changeset viewer.