Ignore:
Timestamp:
4 Jul 2023, 21:05:54 (18 months ago)
Author:
Henrik Bettermann
Message:

Adjust application forms and add application categories.

Location:
main/kofacustom.edocons/trunk/src/kofacustom/edocons/applicants
Files:
2 edited

Legend:

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

    r17460 r17465  
    9191    'cbt_date',
    9292    'jamb_age',
    93     'jamb_subjects',
    94     'jamb_score',
     93    #'jamb_subjects',
     94    #'jamb_score',
    9595    #'jamb_reg_number',
    9696    'aggregate')
     
    130130                form_fields = form_fields.omit(field)
    131131            form_fields['notice'].custom_widget = BytesDisplayWidget
     132        if self.context.__parent__.application_category == 'rnnurse':
     133            form_fields = form_fields.omit('jamb_reg_number', 'jamb_subjects', 'jamb_score', 'course2')
    132134        #form_fields['perm_address'].custom_widget = BytesDisplayWidget
    133135        if not getattr(self.context, 'student_id'):
     
    165167            for field in UG_OMIT_PDF_FIELDS:
    166168                form_fields = form_fields.omit(field)
     169        if self.context.__parent__.application_category == 'rnnurse':
     170            form_fields = form_fields.omit('jamb_reg_number', 'jamb_subjects', 'jamb_score', 'course2')
     171        if self.context.__parent__.application_category == 'ndnurse':
     172            form_fields = form_fields.omit('course2')
    167173        if not getattr(self.context, 'student_id'):
    168174            form_fields = form_fields.omit('student_id')
     
    205211            for field in UG_OMIT_MANAGE_FIELDS:
    206212                form_fields = form_fields.omit(field)
     213        if self.context.__parent__.application_category == 'rnnurse':
     214            form_fields = form_fields.omit('jamb_reg_number', 'jamb_subjects', 'jamb_score', 'course2')
     215        if self.context.__parent__.application_category == 'ndnurse':
     216            form_fields = form_fields.omit('course2')
    207217        form_fields['student_id'].for_display = True
    208218        form_fields['applicant_id'].for_display = True
     
    236246            for field in UG_OMIT_EDIT_FIELDS:
    237247                form_fields = form_fields.omit(field)
     248        if self.context.__parent__.application_category == 'rnnurse':
     249            form_fields = form_fields.omit('jamb_reg_number', 'jamb_subjects', 'jamb_score', 'course2')
     250        if self.context.__parent__.application_category == 'ndnurse':
     251            form_fields = form_fields.omit('course2')
    238252        form_fields['applicant_id'].for_display = True
    239253        form_fields['reg_number'].for_display = True
  • main/kofacustom.edocons/trunk/src/kofacustom/edocons/applicants/interfaces.py

    r17460 r17465  
    194194        required = True,
    195195        )
    196     #course2 = schema.Choice(
    197     #    title = _(u'2nd Choice Course of Study'),
    198     #    source = AppCatCertificateSource(),
    199     #    required = False,
    200     #    )
     196    course2 = schema.Choice(
     197        title = _(u'2nd Choice Course of Study'),
     198        source = AppCatCertificateSource(),
     199        required = False,
     200        )
    201201
    202202    fst_sit_fname = schema.TextLine(
     
    684684        required = True,
    685685        readonly = False,
     686        )
     687
     688    jamb_reg_number = schema.TextLine(
     689        title = _(u'JAMB Registration Number'),
     690        required = True,
     691        constraint=validate_jamb_reg_number,
     692        )
     693
     694    jamb_subjects = schema.Text(
     695        title = _(u'Subjects and Scores'),
     696        required = True,
     697        )
     698
     699    jamb_score = schema.Int(
     700        title = _(u'Total JAMB Score'),
     701        required = True,
    686702        )
    687703
Note: See TracChangeset for help on using the changeset viewer.