Changeset 10134


Ignore:
Timestamp:
2 May 2013, 11:34:38 (11 years ago)
Author:
Henrik Bettermann
Message:

Customize ApplicantsContainerPage? to omit application_fee.

File:
1 edited

Legend:

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

    r10132 r10134  
    2424from zope.formlib.textwidgets import BytesDisplayWidget
    2525from waeup.kofa.applicants.browser import (ApplicantDisplayFormPage,
    26     ApplicantManageFormPage, ApplicantEditFormPage)
     26    ApplicantManageFormPage, ApplicantEditFormPage,
     27    ApplicantsContainerPage)
    2728from waeup.kofa.applicants.viewlets import (
    2829    PaymentReceiptActionButton, PDFActionButton)
     
    4142    ND_OMIT_EDIT_FIELDS
    4243    )
     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 CustomApplicantDisplayFormPage(ApplicantDisplayFormPage):
Note: See TracChangeset for help on using the changeset viewer.