Ignore:
Timestamp:
12 Nov 2019, 08:23:13 (5 years ago)
Author:
Henrik Bettermann
Message:

Payment slip must not be downloadable before adding surcharges.

File:
1 edited

Legend:

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

    r15472 r15796  
    3131    )
    3232from waeup.kofa.applicants.viewlets import (
    33     PDFActionButton)
     33    PDFActionButton, PaymentReceiptActionButton)
    3434from waeup.kofa.applicants.pdf import PDFApplicationSlip
    3535from kofacustom.nigeria.applicants.interfaces import (
     
    6161        return _('Download application slip')
    6262
     63class PaymentReceiptActionButton(PaymentReceiptActionButton):
     64
     65    @property
     66    def target_url(self):
     67        if not self.context.r_company:
     68            return ''
     69        return self.view.url(self.view.context, self.target)
     70
    6371class NigeriaApplicantDisplayFormPage(ApplicantDisplayFormPage):
    6472    """A display view for applicant data.
     
    178186    form_fields['payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le')
    179187
     188    @property
     189    def payment_slip_download_warning(self):
     190        return ''
     191
     192    def update(self):
     193        if not self.context.r_company:
     194            self.redirect(self.url(self.context))
     195            return
     196        return
     197
    180198class NigeriaApplicantRegistrationPage(ApplicantRegistrationPage):
    181199    """Captcha'd registration page for applicants.
Note: See TracChangeset for help on using the changeset viewer.