Ignore:
Timestamp:
24 Sep 2015, 07:35:23 (9 years ago)
Author:
Henrik Bettermann
Message:

Define and use PRE_OMIT_FIELDS.

File:
1 edited

Legend:

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

    r13155 r13277  
    6161    PUDE_OMIT_EDIT_FIELDS,
    6262    PUDE_OMIT_RESULT_SLIP_FIELDS,
     63    PRE_OMIT_DISPLAY_FIELDS,
     64    PRE_OMIT_PDF_FIELDS,
     65    PRE_OMIT_MANAGE_FIELDS,
     66    PRE_OMIT_EDIT_FIELDS,
    6367    )
    6468from kofacustom.nigeria.interfaces import MessageFactory as _
     
    9094            for field in PG_OMIT_DISPLAY_FIELDS:
    9195                form_fields = form_fields.omit(field)
    92         # Don't know what pre-degree studies are, seems to be pre-postgraduate.
    93         # Many modifications are expected. Therefore, we need a dedicated
    94         # elif statement (see also pages below)
    95         elif self.target is not None and self.target.startswith('pre'):
    96             form_fields = grok.AutoFields(INigeriaPGApplicant)
    97             for field in PG_OMIT_DISPLAY_FIELDS:
     96        elif self.target is not None and self.target.startswith('pre'):
     97            form_fields = grok.AutoFields(INigeriaPGApplicant)
     98            for field in PRE_OMIT_DISPLAY_FIELDS:
    9899                form_fields = form_fields.omit(field)
    99100        elif self.target is not None and self.target.startswith('cbt'):
     
    144145        elif self.target is not None and self.target.startswith('pre'):
    145146            form_fields = grok.AutoFields(INigeriaPGApplicant)
    146             for field in PG_OMIT_PDF_FIELDS:
     147            for field in PRE_OMIT_PDF_FIELDS:
    147148                form_fields = form_fields.omit(field)
    148149        elif self.target is not None and self.target.startswith('cbt'):
     
    192193        elif self.target is not None and self.target.startswith('pre'):
    193194            form_fields = grok.AutoFields(INigeriaPGApplicant)
    194             for field in PG_OMIT_MANAGE_FIELDS:
     195            for field in PRE_OMIT_MANAGE_FIELDS:
    195196                form_fields = form_fields.omit(field)
    196197        elif self.target is not None and self.target.startswith('cbt'):
     
    226227        elif self.target is not None and self.target.startswith('pre'):
    227228            form_fields = grok.AutoFields(INigeriaPGApplicantEdit)
    228             for field in PG_OMIT_EDIT_FIELDS:
     229            for field in PRE_OMIT_EDIT_FIELDS:
    229230                form_fields = form_fields.omit(field)
    230231        elif self.target is not None and self.target.startswith('cbt'):
Note: See TracChangeset for help on using the changeset viewer.