- Timestamp:
- 1 Sep 2016, 15:33:23 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/applicants/browser.py
r14141 r14147 31 31 ApplicationFeePaymentAddPage, 32 32 OnlinePaymentApprovePage, 33 ExportPDFPageApplicationSlip) 33 ExportPDFPageApplicationSlip, 34 ApplicantBaseDisplayFormPage) 35 from waeup.kofa.students.interfaces import IStudentsUtils 34 36 from waeup.kofa.applicants.interfaces import ( 35 37 ISpecialApplicant, IApplicantsUtils) … … 609 611 return '%s - %s %s' % (container_title, 610 612 ar_translation, self.context.application_number) 613 614 class ExportScreeningInvitationSlip(UtilityView, grok.View): 615 """Deliver a PDF slip of the context. 616 """ 617 grok.context(ICustomApplicant) 618 grok.name('screening_invitation_slip.pdf') 619 grok.require('waeup.viewApplication') 620 form_fields = None 621 label = u'Invitation Letter for Screening' 622 623 624 @property 625 def note(self): 626 if self.context.screening_date: 627 return """ 628 <br /><br /><br /><br /><font size='12'> 629 Dear %s, 630 <br /><br /><br /> 631 You are invited for your Uniben Admission Screening Exercise on: 632 <br /><br /> 633 <strong>%s</strong>. 634 <br /><br /> 635 Please bring along this letter of invitation to the University Main Auditorium 636 <br /><br /> 637 on your screening date. 638 <br /><br /><br /> 639 Signed, 640 <br /><br /> 641 The Registrar<br /> 642 </font> 643 644 """ % (self.context.display_fullname, self.context.screening_date) 645 return 646 647 def update(self): 648 if not self.context.screening_date: 649 self.flash(_('Forbidden'), type="warning") 650 self.redirect(self.url(self.context)) 651 652 def render(self): 653 applicantview = ApplicantBaseDisplayFormPage(self.context, self.request) 654 students_utils = getUtility(IStudentsUtils) 655 return students_utils.renderPDF(self,'screening_invitation_slip.pdf', 656 self.context, applicantview, note=self.note)
Note: See TracChangeset for help on using the changeset viewer.