Changeset 8103 for main/waeup.kofa
- Timestamp:
- 11 Apr 2012, 08:28:23 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/applicants/pdf.py
r8095 r8103 20 20 """ 21 21 import grok 22 from reportlab.lib.styles import getSampleStyleSheet 23 from reportlab.lib.units import cm 24 from reportlab.platypus import Paragraph, Image, Table, Spacer 22 from reportlab.platypus import Paragraph, Spacer 25 23 from zope.component import getUtility 26 from zope.formlib.form import setUpEditWidgets27 24 from zope.i18n import translate 28 from zope.publisher.browser import TestRequest29 25 from waeup.kofa.applicants.interfaces import IApplicant, IApplicantsUtils 30 26 from waeup.kofa.browser import DEFAULT_PASSPORT_IMAGE_PATH 31 27 from waeup.kofa.browser.interfaces import IPDFCreator 28 from waeup.kofa.browser.pdf import SMALL_PARA_STYLE 32 29 from waeup.kofa.interfaces import IExtFileStore, IPDF, IKofaUtils 33 30 from waeup.kofa.interfaces import MessageFactory as _ … … 84 81 85 82 def _addComments(self, data): 86 style = getSampleStyleSheet()87 83 if self.context.state == 'created': 88 84 comment1 = _( 89 ' <font size=10>Proceed to the login page of the portal' +85 'Proceed to the login page of the portal' + 90 86 ' and enter your new credentials:' + 91 ' user name= ${a}, password = ${b}. </font>', mapping = {87 ' user name= ${a}, password = ${b}.', mapping = { 92 88 'a':self.context.student_id, 93 89 'b':self.context.application_number} 94 90 ) 95 91 comment2 = _( 96 '<font size=10>Change your password when you have ' + 97 ' logged in.</font>' 92 'Change your password when you have logged in.' 98 93 ) 99 comment1 = Paragraph(comment1, style["Normal"])100 comment2 = Paragraph(comment2, style["Normal"])94 comment1 = Paragraph(comment1, SMALL_PARA_STYLE) 95 comment2 = Paragraph(comment2, SMALL_PARA_STYLE) 101 96 data.extend([Spacer(1, 18), comment1, comment2]) 102 97 return data … … 112 107 """ 113 108 doc_title = '\n'.join([x.strip() for x in self.title.split(' - ')]) 114 style = getSampleStyleSheet()115 109 data = [] 116 110 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
Note: See TracChangeset for help on using the changeset viewer.