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

Adjust application forms and add application categories.

File:
1 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
Note: See TracChangeset for help on using the changeset viewer.