Changeset 8259 for main/waeup.uniben/trunk/src/waeup/uniben/applicants
- Timestamp:
- 23 Apr 2012, 14:06:39 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/applicants/browser.py
r8254 r8259 19 19 """ 20 20 import grok 21 from zope.component import getUtility 22 from zope.i18n import translate 21 23 from waeup.kofa.widgets.datewidget import FriendlyDatetimeDisplayWidget 24 from waeup.kofa.students.interfaces import IStudentsUtils 22 25 from waeup.kofa.applicants.interfaces import ( 23 26 IApplicantRegisterUpdate, IApplicant, IApplicantEdit) … … 27 30 ApplicantRegistrationPage, ApplicantAddFormPage, 28 31 OnlinePaymentDisplayFormPage, AcceptanceFeePaymentAddPage, 29 OnlinePaymentBreadcrumb) 30 from waeup.kofa.applicants.viewlets import RequestCallbackActionButton 32 OnlinePaymentBreadcrumb, ExportPDFPaymentSlipPage, 33 ApplicantBaseDisplayFormPage) 34 from waeup.kofa.applicants.viewlets import ( 35 RequestCallbackActionButton, PaymentReceiptActionButton) 31 36 from waeup.kofa.applicants.pdf import PDFApplicationSlip 32 37 from waeup.uniben.applicants.interfaces import ( … … 36 41 37 42 #class RequestCallbackActionButton(RequestCallbackActionButton): 38 # """ D o not display the base package callback button in custom pages.43 # """ Display the base package callback button in custom pages. 39 44 # """ 40 # @property 41 # def target_url(self): 42 # return '' 45 # grok.context(ICustomApplicantOnlinePayment) 43 46 44 47 #class CustomOnlinePaymentCallbackPage(OnlinePaymentCallbackPage): 45 # """ Neutralize callback simulation view48 # """ Activate callback simulation view 46 49 # """ 47 # def update(self): 48 # return 50 # grok.context(ICustomApplicantOnlinePayment) 49 51 50 52 class CustomOnlinePaymentBreadcrumb(OnlinePaymentBreadcrumb): 51 53 """A breadcrumb for payments. 52 54 """ 55 grok.context(ICustomApplicantOnlinePayment) 56 57 class PaymentReceiptActionButton(PaymentReceiptActionButton): 58 grok.order(4) 53 59 grok.context(ICustomApplicantOnlinePayment) 54 60 … … 144 150 payment.surcharge_3 = session_config.surcharge_3 145 151 return payment 152 153 class CustomExportPDFPaymentSlipPage(ExportPDFPaymentSlipPage): 154 """Deliver a PDF slip of the context. 155 """ 156 grok.context(ICustomApplicantOnlinePayment) 157 form_fields = grok.AutoFields(ICustomApplicantOnlinePayment) 158 form_fields['creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le') 159 form_fields['payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le') 160 161 @property 162 def note(self): 163 tcode = self.context.p_id 164 tcode = tcode[len(tcode)-8:len(tcode)] 165 amount = self.context.amount_auth 166 note = translate(_( 167 u"""<br /><br /><br /> 168 The tranzaction code for eTranzact payments is <strong>${a}</strong>.""", 169 mapping = {'a':tcode})) 170 return note
Note: See TracChangeset for help on using the changeset viewer.