Changeset 10594 for main/waeup.kwarapoly


Ignore:
Timestamp:
6 Sep 2013, 06:07:02 (11 years ago)
Author:
Henrik Bettermann
Message:

Enable import of empty sex and course1 cells.

Location:
main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/applicants
Files:
1 added
2 edited

Legend:

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

    r10590 r10594  
    6767    adding them to the UG_OMIT* tuples.
    6868    """
    69 
     69    sex = schema.Choice(
     70        title = _(u'Sex'),
     71        source = GenderSource(),
     72        required = False,
     73        )
    7074    nationality = schema.Choice(
    7175        source = nats_vocab,
    7276        title = _(u'Nationality'),
    73         required = True,
     77        required = False,
    7478        )
    7579    lga = schema.Choice(
     
    9397        title = _(u'1st Choice Course of Study'),
    9498        source = AppCatCertificateSource(),
    95         required = True,
     99        required = False,
    96100        )
    97101    course2 = schema.Choice(
     
    194198        title = _(u'Result uploaded'),
    195199        default = False,
     200        required = False,
    196201        )
    197202    student_id = schema.TextLine(
     
    208213        title = _(u'Form locked'),
    209214        default = False,
    210         )
     215        required = False,
     216        )
     217
     218ICustomUGApplicant[
     219    'sex'].order =  IApplicantBaseData['sex'].order
    211220
    212221class ICustomPGApplicant(INigeriaPGApplicant):
     
    249258    """
    250259
     260    sex = schema.Choice(
     261        title = _(u'Sex'),
     262        source = GenderSource(),
     263        required = True,
     264        )
     265    course1 = schema.Choice(
     266        title = _(u'1st Choice Course of Study'),
     267        source = AppCatCertificateSource(),
     268        required = True,
     269        )
     270
     271ICustomUGApplicantEdit[
     272    'course1'].order =  ICustomUGApplicant['course1'].order
     273ICustomUGApplicantEdit[
     274    'sex'].order =  ICustomUGApplicant['sex'].order
     275
    251276class ICustomPGApplicantEdit(INigeriaPGApplicantEdit):
    252277    """A postgraduate applicant interface for editing.
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/applicants/tests/test_browser.py

    r10133 r10594  
    106106        self.browser.getControl(name="form.date_of_birth").value = '09/09/1988'
    107107        self.browser.getControl(name="form.lga").value = ['foreigner']
    108         self.browser.getControl(name="form.nationality").value = ['NG']
    109         self.browser.getControl(name="form.sex").value = ['m']
     108        #self.browser.getControl(name="form.nationality").value = ['NG']
     109        #self.browser.getControl(name="form.sex").value = ['m']
    110110        self.browser.getControl(name="form.email").value = 'xx@yy.zz'
    111111
     
    135135        self.assertTrue("Higher" in self.browser.contents)
    136136        self.assertTrue("'O' Level" in self.browser.contents)
     137
     138        self.browser.open(self.ndftapplicant_path + '/manage')
     139        # Manager can fill and save the form
     140        self.fill_correct_values()
     141        self.browser.getControl("Save").click()
     142        self.assertMatches('...Form has been saved...', self.browser.contents)
    137143        return
Note: See TracChangeset for help on using the changeset viewer.