Changeset 8103 for main/waeup.kofa


Ignore:
Timestamp:
11 Apr 2012, 08:28:23 (13 years ago)
Author:
uli
Message:

pyflakes and usage of w.k. styles.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/pdf.py

    r8095 r8103  
    2020"""
    2121import grok
    22 from reportlab.lib.styles import getSampleStyleSheet
    23 from reportlab.lib.units import cm
    24 from reportlab.platypus import Paragraph, Image, Table, Spacer
     22from reportlab.platypus import Paragraph, Spacer
    2523from zope.component import getUtility
    26 from zope.formlib.form import setUpEditWidgets
    2724from zope.i18n import translate
    28 from zope.publisher.browser import TestRequest
    2925from waeup.kofa.applicants.interfaces import IApplicant, IApplicantsUtils
    3026from waeup.kofa.browser import DEFAULT_PASSPORT_IMAGE_PATH
    3127from waeup.kofa.browser.interfaces import IPDFCreator
     28from waeup.kofa.browser.pdf import SMALL_PARA_STYLE
    3229from waeup.kofa.interfaces import IExtFileStore, IPDF, IKofaUtils
    3330from waeup.kofa.interfaces import MessageFactory as _
     
    8481
    8582    def _addComments(self, data):
    86         style = getSampleStyleSheet()
    8783        if self.context.state == 'created':
    8884            comment1 = _(
    89                 '<font size=10>Proceed to the login page of the portal' +
     85                'Proceed to the login page of the portal' +
    9086                ' and enter your new credentials:' +
    91                 ' user name= ${a}, password = ${b}.</font>', mapping = {
     87                ' user name= ${a}, password = ${b}.', mapping = {
    9288                    'a':self.context.student_id,
    9389                    'b':self.context.application_number}
    9490                )
    9591            comment2 = _(
    96                 '<font size=10>Change your password when you have ' +
    97                 ' logged in.</font>'
     92                'Change your password when you have logged in.'
    9893                )
    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)
    10196            data.extend([Spacer(1, 18), comment1, comment2])
    10297        return data
     
    112107        """
    113108        doc_title = '\n'.join([x.strip() for x in self.title.split(' - ')])
    114         style = getSampleStyleSheet()
    115109        data = []
    116110        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
Note: See TracChangeset for help on using the changeset viewer.