Changeset 8046 for main/waeup.kofa/trunk/src
- Timestamp:
- 5 Apr 2012, 11:28:20 (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
r8045 r8046 60 60 grok.context(IKofaObject) # Make IKofaObject the default context 61 61 62 SEPARATORS = {}63 SEPARATORS['form.course1'] = _(u'Desired Courses')64 SEPARATORS['form.screening_score'] = _(u'Process Data')65 66 62 class ApplicantsRootPage(KofaPage): 67 63 grok.context(IApplicantsRoot) … … 389 385 label = _('Applicant') 390 386 pnav = 3 391 separators = SEPARATORS 387 388 @property 389 def separators(self): 390 return getUtility(IApplicantsUtils).SEPARATORS_DICT 392 391 393 392 def update(self): … … 630 629 display_actions = [[_('Save'), _('Final Submit')], 631 630 [_('Add online payment ticket'),_('Remove selected tickets')]] 632 separators = SEPARATORS 631 632 @property 633 def separators(self): 634 return getUtility(IApplicantsUtils).SEPARATORS_DICT 633 635 634 636 def update(self): -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/pdf.py
r8013 r8046 21 21 import grok 22 22 from datetime import datetime 23 from zope.component import getUtility24 from zope.i18n import translate25 23 from reportlab.pdfgen import canvas 26 24 from reportlab.lib.units import cm … … 29 27 from reportlab.platypus import Frame, Paragraph, Image, Table, Spacer 30 28 from reportlab.platypus.tables import TableStyle 29 from zope.i18n import translate 31 30 from zope.component import getUtility 32 31 from zope.formlib.form import setUpEditWidgets 33 32 from zope.publisher.browser import TestRequest 34 33 from waeup.kofa.widgets.datewidget import FriendlyDateDisplayWidget 35 from waeup.kofa.applicants.interfaces import IApplicant 34 from waeup.kofa.applicants.interfaces import IApplicant, IApplicantsUtils 36 35 from waeup.kofa.browser import DEFAULT_PASSPORT_IMAGE_PATH 37 36 from waeup.kofa.interfaces import IExtFileStore, IPDF, IKofaUtils … … 175 174 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE 176 175 for widget in widgets: # self.widgets: 176 separators = getUtility(IApplicantsUtils).SEPARATORS_DICT 177 if separators and separators.get(widget.name): 178 f_headline = ('<font size=12><strong>%s</strong></font>' 179 % translate(separators[widget.name], 'waeup.kofa', 180 target_language=portal_language)) 181 f_headline = Paragraph(f_headline, style["Normal"]) 182 data.append([f_headline ]) 177 183 f_label = '<font size=12>%s</font>:' % translate( 178 184 widget.label.strip(), 'waeup.kofa', -
main/waeup.kofa/trunk/src/waeup/kofa/applicants/utils.py
r7844 r8046 21 21 import grok 22 22 from waeup.kofa.applicants.interfaces import IApplicantsUtils 23 from waeup.kofa.interfaces import MessageFactory as _ 23 24 24 25 class ApplicantsUtils(grok.GlobalUtility): … … 30 31 'app': ['General Studies', 'APP'], 31 32 } 33 34 SEPARATORS_DICT = { 35 'form.course1': _(u'Desired Study Courses'), 36 'form.screening_score': _(u'Process Data'), 37 }
Note: See TracChangeset for help on using the changeset viewer.