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

Doing the same in custom.

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

Legend:

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

    r8054 r8072  
    2121from zope import schema
    2222from waeup.kofa.applicants.interfaces import IApplicantBaseData
     23from waeup.kofa.students.vocabularies import nats_vocab
     24from waeup.custom.interfaces import lgas_vocab
    2325from waeup.custom.interfaces import MessageFactory as _
    2426
     
    2830    """
    2931
     32    nationality = schema.Choice(
     33        source = nats_vocab,
     34        title = _(u'Nationality'),
     35        required = False,
     36        )
     37    lga = schema.Choice(
     38        source = lgas_vocab,
     39        title = _(u'State/LGA (Nigerians only)'),
     40        required = False,
     41        )
     42
     43# This ordering doesn't work properly.
     44IUGApplicant[
     45    'nationality'].order =  IApplicantBaseData['sex'].order
     46IUGApplicant[
     47    'lga'].order =  IUGApplicant['nationality'].order
     48
    3049class IPGApplicant(IApplicantBaseData):
    3150    """A postgraduate applicant.
     
    3352    """
    3453
     54    nationality = schema.Choice(
     55        source = nats_vocab,
     56        title = _(u'Nationality'),
     57        required = False,
     58        )
     59    lga = schema.Choice(
     60        source = lgas_vocab,
     61        title = _(u'State/LGA (Nigerians only)'),
     62        required = False,
     63        )
    3564    employer = schema.TextLine(
    3665        title = _(u'Employer'),
     
    3867        readonly = False,
    3968        )
     69
     70# This ordering doesn't work properly.
     71IPGApplicant[
     72    'nationality'].order =  IApplicantBaseData['sex'].order
     73IPGApplicant[
     74    'lga'].order =  IPGApplicant['nationality'].order
     75IPGApplicant[
     76    'student_id'].order =  IPGApplicant['notice'].order
    4077
    4178class IApplicant(IUGApplicant,IPGApplicant):
  • main/waeup.custom/trunk/src/waeup/custom/applicants/tests.py

    r8055 r8072  
    196196            'applicant_id,application_date,application_number,course1,course2,'
    197197            'course_admitted,date_of_birth,display_fullname,email,employer,'
    198             'firstname,history,lastname,lga,locked,middlename,notice,password,'
    199             'phone,reg_number,screening_score,screening_venue,sex,state,'
    200             'student_id'
     198            'firstname,history,lastname,lga,locked,middlename,nationality,'
     199            'notice,password,phone,reg_number,screening_score,screening_venue,'
     200            'sex,state,student_id'
    201201            in result)
    202202        self.assertTrue(
    203             'Application initialized by system\'],Tester,foreigner,0,M.,'
     203            'Application initialized by system\'],Tester,,0,M.,,'
    204204            '"Some notice\nin lines.",any password,+234-123-12345,123456,98,'
    205205            'Exam Room,f,initialized,' in result)
Note: See TracChangeset for help on using the changeset viewer.