Changeset 16026


Ignore:
Timestamp:
6 Mar 2020, 14:07:50 (5 years ago)
Author:
Henrik Bettermann
Message:

Implement HND and ND Final Clearance Pack applications.

Location:
main/kofacustom.dspg/trunk/src/kofacustom/dspg
Files:
4 edited

Legend:

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

    r15592 r16026  
    170170        if self.context.special:
    171171            return grok.AutoFields(ICustomSpecialApplicant)
    172         if self.target == 'conv':
     172        if self.target in ('conv', 'hndfincl', 'ndfincl'):
    173173            form_fields = grok.AutoFields(ICustomSpecialApplicant)
    174174            form_fields = form_fields.omit(
     
    238238    @property
    239239    def form_fields(self):
    240         if self.target in ('conv', 'special'):
     240        if self.target in ('conv', 'special', 'hndfincl', 'ndfincl'):
    241241            form_fields = grok.AutoFields(ICustomSpecialApplicant)
    242242            form_fields = form_fields.omit(
     
    276276            form_fields['applicant_id'].for_display = True
    277277            return form_fields
    278         if self.target == 'conv':
     278        if self.target in ('conv', 'hndfincl', 'ndfincl'):
    279279            form_fields = grok.AutoFields(ICustomSpecialApplicant)
    280280            form_fields = form_fields.omit(
     
    317317            form_fields['applicant_id'].for_display = True
    318318            return form_fields
    319         if self.target == 'conv':
     319        if self.target in ('conv', 'hndfincl', 'ndfincl'):
    320320            form_fields = grok.AutoFields(ICustomSpecialApplicant)
    321321            form_fields = form_fields.omit(
     
    384384    @property
    385385    def form_fields(self):
    386         if self.context.__parent__.prefix in ('conv', 'special'):
     386        if self.context.__parent__.prefix in (
     387            'conv', 'special', 'hndfincl', 'ndfincl'):
    387388            form_fields = grok.AutoFields(ICustomApplicant).select(
    388389                'applicant_id', 'reg_number', 'email')
     
    406407        form_fields['creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
    407408        form_fields['payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
    408         if self.context.__parent__.__parent__.prefix in ('conv', 'special'):
     409        if self.context.__parent__.__parent__.prefix in (
     410            'conv', 'special', 'hndfincl', 'ndfincl'):
    409411            form_fields = form_fields.omit('p_session')
    410412        return form_fields
  • main/kofacustom.dspg/trunk/src/kofacustom/dspg/applicants/utils.py

    r15576 r16026  
    5454        'special': ['Supplementary Payment', 'SP'],
    5555        'conv': ['Convocation Pack Payment', 'CPP'],
     56        'hndfincl': ['HND Final Clearance Pack Payment', 'HNDF'],
     57        'ndfincl': ['ND Final Clearance Pack Payment', 'NDF'],
    5658        }
    5759
  • main/kofacustom.dspg/trunk/src/kofacustom/dspg/applicants/viewlets.py

    r15588 r16026  
    3131        if self.context.state in ('initialized', 'started', 'paid'):
    3232            return
    33         if self.context.__parent__.prefix == 'conv':
     33        if self.context.__parent__.prefix in ('conv', 'hndfincl', 'ndfincl'):
    3434            return
    3535        return self.view.url(self.view.context, self.target)
  • main/kofacustom.dspg/trunk/src/kofacustom/dspg/interswitch/browser.py

    r15959 r16026  
    510510            xmldict['institution_acct'] = '1015220292'
    511511            xmldict['institution_bank_id'] = '117'
    512         elif self.applicant.__parent__.prefix == 'conv':
     512        elif self.applicant.__parent__.prefix in ('conv', 'hndfincl', 'ndfincl'):
    513513            xmldict['institution_acct'] = '1012808851'
    514514            xmldict['institution_bank_id'] = '117'
Note: See TracChangeset for help on using the changeset viewer.