Ignore:
Timestamp:
9 Apr 2012, 07:35:03 (13 years ago)
Author:
Henrik Bettermann
Message:

Add nationality and lga fields in interfaces.

Location:
main/waeup.uniben/trunk/src/waeup/uniben/applicants
Files:
2 edited

Legend:

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

    r8053 r8071  
    2525from waeup.kofa.schoolgrades import ResultEntryField
    2626from waeup.kofa.interfaces import SimpleKofaVocabulary
     27from waeup.kofa.students.vocabularies import nats_vocab
     28from waeup.uniben.interfaces import lgas_vocab
    2729from waeup.uniben.interfaces import MessageFactory as _
    2830
     
    7678    """
    7779
     80    nationality = schema.Choice(
     81        source = nats_vocab,
     82        title = _(u'Nationality'),
     83        required = False,
     84        )
     85    lga = schema.Choice(
     86        source = lgas_vocab,
     87        title = _(u'State/LGA (Nigerians only)'),
     88        required = False,
     89        )
     90
     91# This ordering doesn't work properly.
     92IUGApplicant[
     93    'nationality'].order =  IApplicantBaseData['sex'].order
     94IUGApplicant[
     95    'lga'].order =  IUGApplicant['nationality'].order
     96
     97
    7898class IPGApplicant(IApplicantBaseData):
    7999    """A postgraduate applicant.
     
    81101    """
    82102
     103    nationality = schema.Choice(
     104        source = nats_vocab,
     105        title = _(u'Nationality'),
     106        required = False,
     107        )
     108    lga = schema.Choice(
     109        source = lgas_vocab,
     110        title = _(u'State/LGA (Nigerians only)'),
     111        required = False,
     112        )
    83113    perm_address = schema.Text(
    84114        title = _(u'Permanent Address'),
     
    206236
    207237
     238# This ordering doesn't work properly.
     239IPGApplicant[
     240    'nationality'].order =  IApplicantBaseData['sex'].order
     241IPGApplicant[
     242    'lga'].order =  IPGApplicant['nationality'].order
    208243IPGApplicant[
    209244    'student_id'].order =  IPGApplicant['notice'].order
     245
    210246
    211247class IApplicant(IUGApplicant,IPGApplicant):
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/tests.py

    r8064 r8071  
    199199            'emp_start,employer,employer2,firstname,history,hq_degree,hq_disc,'
    200200            'hq_matric_no,hq_school,hq_session,hq_type,lastname,lga,locked,'
    201             'middlename,notice,password,perm_address,phone,pp_school,reg_number,'
    202             'screening_score,screening_venue,sex,state,student_id'
     201            'middlename,nationality,notice,password,perm_address,phone,pp_school,'
     202            'reg_number,screening_score,screening_venue,sex,state,student_id'
    203203            in result)
    204204        self.assertTrue(
    205             'Application initialized by system\'],,,,,,,Tester,foreigner,0,M.,'
     205            'Application initialized by system\'],,,,,,,Tester,,0,M.,,'
    206206            '"Some notice\nin lines.",any password,,+234-123-12345,,123456,98,'
    207207            'Exam Room,f,initialized,' in result)
Note: See TracChangeset for help on using the changeset viewer.