Changeset 13551


Ignore:
Timestamp:
21 Dec 2015, 08:42:15 (9 years ago)
Author:
Henrik Bettermann
Message:

Add omit fields for affiliation programmes (needed by Uniben).

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

Legend:

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

    r13277 r13551  
    4747    CBT_OMIT_MANAGE_FIELDS,
    4848    CBT_OMIT_EDIT_FIELDS,
     49    AFFIL_OMIT_DISPLAY_FIELDS,
     50    AFFIL_OMIT_PDF_FIELDS,
     51    AFFIL_OMIT_MANAGE_FIELDS,
     52    AFFIL_OMIT_EDIT_FIELDS,
    4953    PG_OMIT_DISPLAY_FIELDS,
    5054    PG_OMIT_PDF_FIELDS,
     
    102106            for field in CBT_OMIT_DISPLAY_FIELDS:
    103107                form_fields = form_fields.omit(field)
     108        elif self.target is not None and self.target.startswith('affil'):
     109            form_fields = grok.AutoFields(INigeriaUGApplicant)
     110            for field in AFFIL_OMIT_DISPLAY_FIELDS:
     111                form_fields = form_fields.omit(field)
    104112        elif self.target is not None and self.target.startswith('putme'):
    105113            form_fields = grok.AutoFields(INigeriaUGApplicant)
     
    151159            for field in CBT_OMIT_PDF_FIELDS:
    152160                form_fields = form_fields.omit(field)
     161        elif self.target is not None and self.target.startswith('affil'):
     162            form_fields = grok.AutoFields(INigeriaUGApplicant)
     163            for field in AFFIL_OMIT_PDF_FIELDS:
     164                form_fields = form_fields.omit(field)
    153165        elif self.target is not None and self.target.startswith('putme'):
    154166            form_fields = grok.AutoFields(INigeriaUGApplicant)
     
    199211            for field in CBT_OMIT_MANAGE_FIELDS:
    200212                form_fields = form_fields.omit(field)
     213        elif self.target is not None and self.target.startswith('affil'):
     214            form_fields = grok.AutoFields(INigeriaUGApplicant)
     215            for field in AFFIL_OMIT_MANAGE_FIELDS:
     216                form_fields = form_fields.omit(field)
    201217        elif self.target is not None and self.target.startswith('putme'):
    202218            form_fields = grok.AutoFields(INigeriaUGApplicant)
     
    232248            form_fields = grok.AutoFields(INigeriaUGApplicantEdit)
    233249            for field in CBT_OMIT_EDIT_FIELDS:
     250                form_fields = form_fields.omit(field)
     251        elif self.target is not None and self.target.startswith('affil'):
     252            form_fields = grok.AutoFields(INigeriaUGApplicantEdit)
     253            for field in AFFIL_OMIT_EDIT_FIELDS:
    234254                form_fields = form_fields.omit(field)
    235255        elif self.target is not None and self.target.startswith('putme'):
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/applicants/interfaces.py

    r13290 r13551  
    130130CBT_OMIT_PDF_FIELDS = CBT_OMIT_DISPLAY_FIELDS + ('phone',)
    131131
     132# AFFIL is a subgroup of UG with the same interface.
     133AFFIL_OMIT_FIELDS = (
     134    'hq_type', 'hq_matric_no',
     135    'hq_degree', 'hq_school',
     136    'hq_session', 'hq_disc',
     137    'aggregate','jamb_subjects',)
     138AFFIL_OMIT_DISPLAY_FIELDS = OMIT_DISPLAY_FIELDS + AFFIL_OMIT_FIELDS
     139AFFIL_OMIT_MANAGE_FIELDS = AFFIL_OMIT_FIELDS + ('special_application',)
     140AFFIL_OMIT_EDIT_FIELDS = OMIT_DISPLAY_FIELDS + AFFIL_OMIT_FIELDS + (
     141    'special_application',
     142    'student_id',
     143    'notice',
     144    'screening_score',
     145    'screening_venue',
     146    'screening_date',
     147    )
     148AFFIL_OMIT_PDF_FIELDS = AFFIL_OMIT_DISPLAY_FIELDS # + ('phone',)
     149
    132150# PUTME is a subgroup of UG with the same interface.
    133151PUTME_OMIT_FIELDS = (
Note: See TracChangeset for help on using the changeset viewer.