Changeset 8259 for main/waeup.uniben/trunk/src/waeup/uniben/students
- Timestamp:
- 23 Apr 2012, 14:06:39 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py
r8247 r8259 19 19 from zope.formlib.textwidgets import BytesDisplayWidget 20 20 from zope.component import getUtility 21 from zope.i18n import translate 21 22 from waeup.kofa.widgets.datewidget import FriendlyDatetimeDisplayWidget 22 23 from waeup.kofa.interfaces import IExtFileStore … … 29 30 StudentBaseEditFormPage, StudentPersonalEditFormPage, 30 31 OnlinePaymentDisplayFormPage, OnlinePaymentAddFormPage, 31 OnlinePaymentBreadcrumb) 32 from waeup.kofa.students.viewlets import RequestCallbackActionButton 32 OnlinePaymentBreadcrumb, ExportPDFPaymentSlipPage) 33 from waeup.kofa.students.viewlets import ( 34 RequestCallbackActionButton, PaymentReceiptActionButton) 33 35 from waeup.uniben.students.interfaces import ( 34 36 ICustomStudentBase, ICustomStudent, ICustomStudentPersonal, … … 38 40 from waeup.uniben.interfaces import MessageFactory as _ 39 41 42 #class RequestCallbackActionButton(RequestCallbackActionButton): 43 # """ Display the base package callback button in custom pages. 44 # """ 45 # grok.context(ICustomStudentOnlinePayment) 46 47 #class CustomOnlinePaymentCallbackPage(OnlinePaymentCallbackPage): 48 # """ Activate callback simulation view 49 # """ 50 # grok.context(ICustomStudentOnlinePayment) 51 40 52 class CustomOnlinePaymentBreadcrumb(OnlinePaymentBreadcrumb): 41 53 """A breadcrumb for payments. … … 43 55 grok.context(ICustomStudentOnlinePayment) 44 56 45 class RequestCallbackActionButton(RequestCallbackActionButton): 46 """ Do not display the base package callback button in custom pages. 47 """ 48 @property 49 def target_url(self): 50 return '' 51 52 class CustomOnlinePaymentCallbackPage(OnlinePaymentCallbackPage): 53 """ Neutralize callback simulation view 54 """ 55 def update(self): 56 return 57 class PaymentReceiptActionButton(PaymentReceiptActionButton): 58 grok.order(4) 59 grok.context(ICustomStudentOnlinePayment) 57 60 58 61 class CustomStudentBaseManageFormPage(StudentBaseManageFormPage): … … 182 185 payment.surcharge_3 = pay_details['surcharge_3'] 183 186 return payment 187 188 class CustomExportPDFPaymentSlipPage(ExportPDFPaymentSlipPage): 189 """Deliver a PDF slip of the context. 190 """ 191 grok.context(ICustomStudentOnlinePayment) 192 form_fields = grok.AutoFields(ICustomStudentOnlinePayment) 193 form_fields['creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le') 194 form_fields['payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le') 195 196 @property 197 def note(self): 198 tcode = self.context.p_id 199 tcode = tcode[len(tcode)-8:len(tcode)] 200 amount = self.context.amount_auth 201 note = translate(_( 202 u"""<br /><br /><br /> 203 The tranzaction code for eTranzact payments is <strong>${a}</strong>.""", 204 mapping = {'a':tcode})) 205 return note
Note: See TracChangeset for help on using the changeset viewer.