Changeset 15796 for main/kofacustom.nigeria/trunk/src
- Timestamp:
- 12 Nov 2019, 08:23:13 (5 years ago)
- Location:
- main/kofacustom.nigeria/trunk/src/kofacustom/nigeria
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/applicants/browser.py
r15472 r15796 31 31 ) 32 32 from waeup.kofa.applicants.viewlets import ( 33 PDFActionButton )33 PDFActionButton, PaymentReceiptActionButton) 34 34 from waeup.kofa.applicants.pdf import PDFApplicationSlip 35 35 from kofacustom.nigeria.applicants.interfaces import ( … … 61 61 return _('Download application slip') 62 62 63 class 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 63 71 class NigeriaApplicantDisplayFormPage(ApplicantDisplayFormPage): 64 72 """A display view for applicant data. … … 178 186 form_fields['payment_date'].custom_widget = FriendlyDatetimeDisplayWidget('le') 179 187 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 180 198 class NigeriaApplicantRegistrationPage(ApplicantRegistrationPage): 181 199 """Captcha'd registration page for applicants. -
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/applicantsbrowser.py
r15772 r15796 43 43 grok.require('waeup.payApplicant') 44 44 icon = 'actionicon_pay.png' 45 text = _('Pay via Etranzact ')45 text = _('Pay via Etranzact WebConnect') 46 46 target = 'goto_etranzact' 47 47 … … 61 61 grok.require('waeup.payApplicant') 62 62 icon = 'actionicon_call.png' 63 text = _('Requery Etranzact History')63 text = _('Requery Etranzact WebConnect History') 64 64 target = 'requery_history' 65 65 … … 69 69 self.context.__parent__.__parent__.year, self.context): 70 70 return '' 71 if self.context.p_state in ('paid', 'waived' ):71 if self.context.p_state in ('paid', 'waived', 'scholarship'): 72 72 return '' 73 73 return self.view.url(self.view.context, self.target) … … 185 185 self.context.__parent__.__parent__.year, self.context): 186 186 return 187 if self.context.p_state in ('paid', 'waived' ):187 if self.context.p_state in ('paid', 'waived', 'scholarship'): 188 188 self.flash(_('This ticket has already been paid.'), type='danger') 189 189 return -
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/payoutletbrowser.py
r15788 r15796 31 31 from waeup.kofa.students.viewlets import ApprovePaymentActionButton as APABStudent 32 32 from waeup.kofa.applicants.viewlets import ApprovePaymentActionButton as APABApplicant 33 from waeup.kofa.students.viewlets import PaymentReceiptActionButton as PRABStudent 34 from waeup.kofa.applicants.viewlets import PaymentReceiptActionButton as PRABApplicant 33 35 from kofacustom.nigeria.interswitch.browser import ( 34 36 InterswitchActionButtonStudent, … … 57 59 grok.require('waeup.payApplicant') 58 60 grok.order(3) 59 icon = 'actionicon_ call.png'60 text = _(' Enter Etranzact PIN')61 icon = 'actionicon_pay.png' 62 text = _('Pay via Etranzact PayOutlet') 61 63 target = 'enterpin' 62 64 … … 66 68 self.context.__parent__.__parent__.year, self.context): 67 69 return '' 68 if self.context.p_state in ('paid', 'waived' ):70 if self.context.p_state in ('paid', 'waived', 'scholarship'): 69 71 return '' 70 72 return self.view.url(self.view.context, self.target) … … 74 76 grok.require('waeup.payStudent') 75 77 grok.order(3) 76 icon = 'actionicon_ call.png'77 text = _(' Enter Etranzact PIN')78 icon = 'actionicon_pay.png' 79 text = _('Pay via Etranzact PayOutlet') 78 80 target = 'enterpin' 79 81 … … 83 85 self.context.student.current_session, self.context): 84 86 return '' 85 if self.context.p_state in ('paid', 'waived' ):87 if self.context.p_state in ('paid', 'waived', 'scholarship'): 86 88 return '' 87 89 return self.view.url(self.view.context, self.target) … … 96 98 97 99 buttonname = _('Submit to Etranzact') 98 label = _('Requery Etranzact History')100 label = _('Requery Etranzact PayOutlet History') 99 101 action = 'query_payoutlet_history' 100 102 placeholder = _('Confirmation Number (PIN)') … … 123 125 grok.template('enterpin') 124 126 127 buttonname = _('Submit to Etranzact') 128 label = _('Requery Etranzact PayOutlet History') 129 action = 'query_payoutlet_history' 130 placeholder = _('Confirmation Number (PIN)') 131 gateway_amt = GATEWAY_AMT 132 125 133 def update(self): 126 134 if not payoutlet_module_activated( 127 135 self.context.__parent__.__parent__.year, self.context): 128 136 return 129 super(EtranzactEnterPinPage Student, self).update()137 super(EtranzactEnterPinPageApplicant, self).update() 130 138 # Already now it becomes an Etranzact payment. We set the net amount 131 139 # and add the gateway amount. … … 136 144 self.context.r_company = u'etranzact' 137 145 return 146 147 class PayoutletPaymentReceiptActionButtonApplicant(PRABApplicant): 148 149 grok.view(EtranzactEnterPinPageApplicant) 150 151 @property 152 def target_url(self): 153 if not self.context.r_company: 154 return '' 155 return self.view.url(self.view.context, self.target) 156 157 class PayoutletPaymentReceiptActionButtonStudent(PRABStudent): 158 159 grok.view(EtranzactEnterPinPageStudent) 160 161 @property 162 def target_url(self): 163 if not self.context.r_company: 164 return '' 165 return self.view.url(self.view.context, self.target) 138 166 139 167 class EtranzactQueryHistoryPageStudent(UtilityView, grok.View): -
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/studentsbrowser.py
r15772 r15796 52 52 grok.require('waeup.payStudent') 53 53 icon = 'actionicon_pay.png' 54 text = _('Pay via Etranzact ')54 text = _('Pay via Etranzact WebConnect') 55 55 target = 'goto_etranzact' 56 56 … … 70 70 grok.require('waeup.payStudent') 71 71 icon = 'actionicon_call.png' 72 text = _('Requery Etranzact History')72 text = _('Requery Etranzact WebConnect History') 73 73 target = 'requery_history' 74 74 … … 78 78 self.context.student.current_session, self.context): 79 79 return '' 80 if self.context.p_state in ('paid', 'waived' ):80 if self.context.p_state in ('paid', 'waived', 'scholarship'): 81 81 return '' 82 82 return self.view.url(self.view.context, self.target) … … 194 194 self.context.student.current_session, self.context): 195 195 return 196 if self.context.p_state in ('paid', 'waived' ):196 if self.context.p_state in ('paid', 'waived', 'scholarship'): 197 197 self.flash(_('This ticket has already been paid.'), type='danger') 198 198 return -
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/browser.py
r15711 r15796 62 62 grok.context(INigeriaStudentOnlinePayment) 63 63 64 @property 65 def target_url(self): 66 if not self.context.r_company: 67 return '' 68 return self.view.url(self.view.context, self.target) 69 70 64 71 class NigeriaStudentBaseDisplayFormPage(StudentBaseDisplayFormPage): 65 72 """ Page to display student base data … … 221 228 'adm_code', 'sex', 'email', 'date_of_birth', 'current_level', 222 229 'flash_notice') 230 231 def update(self): 232 if not self.context.r_company: 233 self.redirect(self.url(self.context)) 234 return 235 return 223 236 224 237 class NigeriaAccommodationManageFormPage(AccommodationManageFormPage):
Note: See TracChangeset for help on using the changeset viewer.