Ignore:
Timestamp:
27 Jul 2017, 05:22:28 (7 years ago)
Author:
Henrik Bettermann
Message:

Require uploading of picture before payment.

File:
1 edited

Legend:

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

    r14721 r14732  
    2323from waeup.kofa.widgets.datewidget import FriendlyDatetimeDisplayWidget
    2424from zope.formlib.textwidgets import BytesDisplayWidget
     25from waeup.kofa.interfaces import IExtFileStore, IKofaUtils
    2526from waeup.kofa.applicants.interfaces import (
    2627    IApplicant, IApplicantEdit, ISpecialApplicant)
    2728from waeup.kofa.applicants.browser import (ApplicantDisplayFormPage,
    2829    ApplicantManageFormPage, ApplicantEditFormPage,
    29     ApplicantsContainerPage)
     30    ApplicantsContainerPage, ApplicationFeePaymentAddPage)
    3031from waeup.kofa.applicants.viewlets import (
    3132    PaymentReceiptActionButton, PDFActionButton)
     
    4546    )
    4647
     48from kofacustom.dspg.interfaces import MessageFactory as _
     49
    4750UG_OMIT_EDIT_FIELDS = [
    4851    value for value in UG_OMIT_EDIT_FIELDS
     
    196199        form_fields['reg_number'].for_display = True
    197200        return form_fields
     201
     202class CustomApplicationFeePaymentAddPage(ApplicationFeePaymentAddPage):
     203    """ Page to add an online payment ticket
     204    """
     205
     206    @property
     207    def custom_requirements(self):
     208        store = getUtility(IExtFileStore)
     209        if not store.getFileByContext(self.context, attr=u'passport.jpg'):
     210            return _('Upload your passport photo before making payment.')
     211        return ''
Note: See TracChangeset for help on using the changeset viewer.