Changeset 8262 for main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Timestamp:
- 24 Apr 2012, 15:27:00 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa/applicants
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
r8260 r8262 544 544 """ 545 545 grok.context(IApplicantOnlinePayment) 546 grok.name('payment_ receipt.pdf')546 grok.name('payment_slip.pdf') 547 547 grok.require('waeup.viewApplication') 548 548 form_fields = grok.AutoFields(IApplicantOnlinePayment) … … 561 561 def label(self): 562 562 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE 563 return translate(_('Online Payment Receipt'),563 return translate(_('Online Payment Slip'), 564 564 'waeup.kofa', target_language=portal_language) \ 565 565 + ' %s' % self.context.p_id 566 566 567 567 def render(self): 568 if self.context.p_state != 'paid':569 self.flash(_('Ticket not yet paid.'))570 self.redirect(self.url(self.context))571 return568 #if self.context.p_state != 'paid': 569 # self.flash(_('Ticket not yet paid.')) 570 # self.redirect(self.url(self.context)) 571 # return 572 572 applicantview = ApplicantBaseDisplayFormPage(self.context.__parent__, 573 573 self.request) 574 574 students_utils = getUtility(IStudentsUtils) 575 return students_utils.renderPDF(self,'payment_ receipt.pdf',575 return students_utils.renderPDF(self,'payment_slip.pdf', 576 576 self.context.__parent__, applicantview, note=self.note) 577 577 -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_browser.py
r8260 r8262 635 635 self.browser.contents) 636 636 payment_url = self.browser.url 637 # The pdf payment receiptcan't yet be opened638 self.browser.open(payment_url + '/payment_receipt.pdf')639 self.assertMatches('...Ticket not yet paid...',640 self.browser.contents)637 # The pdf payment slip can't yet be opened 638 #self.browser.open(payment_url + '/payment_receipt.pdf') 639 #self.assertMatches('...Ticket not yet paid...', 640 # self.browser.contents) 641 641 # Request callback 642 642 self.browser.open(payment_url) … … 649 649 "...Transition 'pay' requires 'started' as source state...", 650 650 self.browser.contents) 651 # The payment receiptcan be downloaded now651 # The payment slip can be downloaded now 652 652 self.browser.open(payment_url) 653 self.browser.getLink("Download payment receipt").click()653 self.browser.getLink("Download payment slip").click() 654 654 self.assertEqual(self.browser.headers['Status'], '200 Ok') 655 655 self.assertEqual(self.browser.headers['Content-Type'], -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/viewlets.py
r8243 r8262 166 166 grok.require('waeup.viewApplication') 167 167 icon = 'actionicon_pdf.png' 168 text = _('Download payment receipt')169 target = 'payment_ receipt.pdf'168 text = _('Download payment slip') 169 target = 'payment_slip.pdf' 170 170 171 171 @property 172 172 def target_url(self): 173 if self.context.p_state != 'paid':174 return ''173 #if self.context.p_state != 'paid': 174 # return '' 175 175 return self.view.url(self.view.context, self.target) 176 176
Note: See TracChangeset for help on using the changeset viewer.