Changeset 8247 for main/waeup.uniben/trunk/src/waeup/uniben/applicants
- Timestamp:
- 22 Apr 2012, 12:56:07 (13 years ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben/applicants
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/applicants/browser.py
r8196 r8247 19 19 """ 20 20 import grok 21 from waeup.kofa.widgets.datewidget import FriendlyDatetimeDisplayWidget 21 22 from waeup.kofa.applicants.interfaces import ( 22 23 IApplicantRegisterUpdate, IApplicant, IApplicantEdit) … … 24 25 OnlinePaymentCallbackPage, ExportPDFPage, 25 26 ApplicantManageFormPage, ApplicantEditFormPage, 26 ApplicantRegistrationPage, ApplicantAddFormPage) 27 ApplicantRegistrationPage, ApplicantAddFormPage, 28 OnlinePaymentDisplayFormPage, AcceptanceFeePaymentAddPage, 29 OnlinePaymentBreadcrumb) 27 30 from waeup.kofa.applicants.viewlets import RequestCallbackActionButton 28 31 from waeup.kofa.applicants.pdf import PDFApplicationSlip 29 32 from waeup.uniben.applicants.interfaces import ( 30 IPGApplicant, IUGApplicant, IPGApplicantEdit, IUGApplicantEdit) 33 IPGApplicant, IUGApplicant, IPGApplicantEdit, IUGApplicantEdit, 34 ICustomApplicantOnlinePayment) 31 35 from waeup.uniben.interfaces import MessageFactory as _ 32 36 33 class CustomRequestCallbackActionButton(RequestCallbackActionButton): 34 """ Do not display the base package callback button in custom pages. 37 #class RequestCallbackActionButton(RequestCallbackActionButton): 38 # """ Do not display the base package callback button in custom pages. 39 # """ 40 # @property 41 # def target_url(self): 42 # return '' 43 44 #class CustomOnlinePaymentCallbackPage(OnlinePaymentCallbackPage): 45 # """ Neutralize callback simulation view 46 # """ 47 # def update(self): 48 # return 49 50 class CustomOnlinePaymentBreadcrumb(OnlinePaymentBreadcrumb): 51 """A breadcrumb for payments. 35 52 """ 36 @property 37 def target_url(self): 38 return '' 39 40 class CustomOnlinePaymentCallbackPage(OnlinePaymentCallbackPage): 41 """ Neutralize callback simulation view 42 """ 43 def update(self): 44 return 53 grok.context(ICustomApplicantOnlinePayment) 45 54 46 55 class CustomPDFApplicationSlip(PDFApplicationSlip): … … 107 116 form_fields['reg_number'].for_display = True 108 117 return form_fields 118 119 class CustomOnlinePaymentDisplayFormPage(OnlinePaymentDisplayFormPage): 120 """ Page to view an online payment ticket 121 """ 122 grok.context(ICustomApplicantOnlinePayment) 123 form_fields = grok.AutoFields(ICustomApplicantOnlinePayment) 124 form_fields[ 125 'creation_date'].custom_widget = FriendlyDatetimeDisplayWidget('le') 126 form_fields[ 127 'payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le') 128 grok.template('payment_view') 129 130 @property 131 def transaction_code(self): 132 tcode = self.context.p_id 133 return tcode[len(tcode)-8:len(tcode)] 134 135 class CustomAcceptanceFeePaymentAddPage(AcceptanceFeePaymentAddPage): 136 """ Page to add an online payment ticket 137 """ 138 factory = u'waeup.CustomApplicantOnlinePayment' 139 140 def _fillCustomFields(self, payment, session_config): 141 payment.surcharge_1 = session_config.surcharge_1 142 payment.surcharge_2 = session_config.surcharge_2 143 payment.surcharge_3 = session_config.surcharge_3 144 return payment -
main/waeup.uniben/trunk/src/waeup/uniben/applicants/interfaces.py
r8196 r8247 24 24 AppCatCertificateSource, CertificateSource) 25 25 from waeup.kofa.schoolgrades import ResultEntryField 26 from waeup.kofa.interfaces import SimpleKofaVocabulary 26 from waeup.kofa.interfaces import SimpleKofaVocabulary, academic_sessions_vocab 27 27 from waeup.kofa.schema import FormattedDate 28 28 from waeup.kofa.students.vocabularies import nats_vocab … … 30 30 lgas_vocab, high_qual, high_grade, exam_types) 31 31 from waeup.uniben.interfaces import MessageFactory as _ 32 32 from waeup.uniben.payments.interfaces import ICustomOnlinePayment 33 33 34 34 class IUGApplicant(IApplicantBaseData): … … 261 261 respective form page. 262 262 """ 263 class ICustomApplicantOnlinePayment(ICustomOnlinePayment): 264 """An applicant payment via payment gateways. 265 266 """ -
main/waeup.uniben/trunk/src/waeup/uniben/applicants/utils.py
r8101 r8247 19 19 """ 20 20 21 import sys 21 22 import grok 23 from hurry.workflow.interfaces import IWorkflowInfo, InvalidTransitionError 22 24 from waeup.kofa.applicants.utils import ApplicantsUtils 23 25 from waeup.uniben.interfaces import MessageFactory as _ 26 27 28 def actions_after_applicant_payment(applicant, view): 29 wf_info = IWorkflowInfo(applicant) 30 try: 31 wf_info.fireTransition('pay') 32 except InvalidTransitionError: 33 view.flash('Error: %s' % sys.exc_info()[1]) 34 return 24 35 25 36 class ApplicantsUtils(ApplicantsUtils):
Note: See TracChangeset for help on using the changeset viewer.