Changeset 10587 for main/waeup.uniben


Ignore:
Timestamp:
5 Sep 2013, 11:18:07 (11 years ago)
Author:
Henrik Bettermann
Message:

Customize ApplicantsContainerPage? to hide application_fee

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/applicants/browser.py

    r10378 r10587  
    1919"""
    2020import grok
    21 from waeup.kofa.applicants.browser import ApplicantRegistrationPage
     21from waeup.kofa.applicants.browser import (
     22    ApplicantRegistrationPage, ApplicantsContainerPage)
    2223from kofacustom.nigeria.applicants.browser import (
    2324    NigeriaApplicantDisplayFormPage,
     
    4142
    4243PASTQ_MSS = ['ACC','BNK','BUS','ECO','GEO','POL','SAA','SWK'] + PASTQ_ALL
     44
     45class CustomApplicantsContainerPage(ApplicantsContainerPage):
     46    """The standard view for regular applicant containers.
     47    """
     48
     49    @property
     50    def form_fields(self):
     51        form_fields = super(CustomApplicantsContainerPage, self).form_fields
     52        if self.request.principal.id == 'zope.anybody':
     53            return form_fields.omit('application_fee')
     54        return form_fields
    4355
    4456class CustomApplicantRegistrationPage(ApplicantRegistrationPage):
Note: See TracChangeset for help on using the changeset viewer.