Ignore:
Timestamp:
3 Dec 2023, 11:29:17 (13 months ago)
Author:
Henrik Bettermann
Message:

Open JAMB fields for editing.

Location:
main/kofacustom.unidel/trunk/src/kofacustom/unidel/applicants
Files:
4 edited

Legend:

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

    r17479 r17652  
    158158            for field in PG_OMIT_EDIT_FIELDS:
    159159                form_fields = form_fields.omit(field)
     160        elif getattr(self.context.__parent__, 'code', None) == 'ase2023':
     161            form_fields = grok.AutoFields(ICustomUGApplicantEdit)
     162            temp_UG_OMIT_EDIT_FIELDS = list(UG_OMIT_EDIT_FIELDS)
     163            for x in ('jamb_subjects',
     164                      'jamb_score',
     165                      'jamb_reg_number',
     166                      'lga',):
     167                temp_UG_OMIT_EDIT_FIELDS.remove(x)
     168            for field in temp_UG_OMIT_EDIT_FIELDS:
     169                form_fields = form_fields.omit(field)
    160170        else:
    161171            form_fields = grok.AutoFields(ICustomUGApplicantEdit)
  • main/kofacustom.unidel/trunk/src/kofacustom/unidel/applicants/interfaces.py

    r17589 r17652  
    207207        readonly = False,
    208208        )
     209    jamb_reg_number = schema.TextLine(
     210        title = _(u'JAMB Registration Number'),
     211        required = False,
     212        constraint=validate_jamb_reg_number,
     213        )
    209214    jamb_subjects = schema.Text(
    210215        title = _(u'Subjects and Scores'),
     
    228233    #    required = False,
    229234    #    )
    230     #jamb_reg_number = schema.TextLine(
    231     #    title = _(u'JAMB Registration Number'),
    232     #    required = False,
    233     #    constraint=validate_jamb_reg_number,
    234     #    )
    235235    notice = schema.Text(
    236236        title = _(u'Notice'),
  • main/kofacustom.unidel/trunk/src/kofacustom/unidel/applicants/tests/test_browser.py

    r16721 r17652  
    3636
    3737    layer = FunctionalLayer
     38
     39    def test_applicant_access(self):
     40        # Applicants can edit their record
     41        self.browser.open(self.login_path)
     42        self.login()
     43        self.assertTrue(
     44            'You logged in as an applicant.' in self.browser.contents)
     45        self.browser.open(self.edit_path)
     46        return
    3847
    3948class ApplicantExporterTest(ApplicantImportExportSetup):
  • main/kofacustom.unidel/trunk/src/kofacustom/unidel/applicants/utils.py

    r17554 r17652  
    4343        'law': ['Certificate in Law Programme', 'CL'],
    4444        }
     45
     46    SEPARATORS_DICT = {
     47        'form.applicant_id': _(u'Base Data'),
     48        'form.course1': _(u'Programmes/Courses Desired'),
     49        'form.hq_type': _(u'Higher Education Record'),
     50        'form.presently': _(u'Course or Programme Presently Attending'),
     51        'form.nysc_year': _(u'NYSC Information'),
     52        'form.employer': _(u'Employment History'),
     53        'form.jamb_reg_number': _(u'JAMB Data'),
     54        #'form.jamb_subjects': _(u'JAMB Data'),
     55        #'form.jamb_subjects_list': _(u'JAMB Data'),
     56        'form.notice': _(u'Application Process Information'),
     57        'form.pp_school': _(u'Post Primary School Qualification'),
     58        'form.presently_inst': _(u'Presently attending a course or programme'),
     59        'form.fst_sit_fname': _(u'First Sitting Record'),
     60        'form.scd_sit_fname': _(u'Second Sitting Record'),
     61        'form.referees': _(u'Referees'),
     62        }
Note: See TracChangeset for help on using the changeset viewer.