Ignore:
Timestamp:
22 Feb 2013, 17:23:48 (12 years ago)
Author:
Henrik Bettermann
Message:

Make admission intro text cutomizable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py

    r9966 r9979  
    468468        return available_beds[0]
    469469
     470    def _admissionText(portal_language):
     471        inst_name = grok.getSite()['configuration'].name
     472        text = trans(_(
     473            'This is to inform you that you have been provisionally'
     474            ' admitted into ${a} as follows:', mapping = {'a': inst_name}),
     475            portal_language)
     476        return text
     477
    470478    def renderPDFAdmissionLetter(self, view, student=None):
    471479        """Render pdf admission letter.
     
    475483        style = getSampleStyleSheet()
    476484        creator = self.getPDFCreator(student)
     485        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    477486        data = []
    478487        doc_title = view.label
     
    490499
    491500        # Admission text
    492         portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    493         inst_name = grok.getSite()['configuration'].name
    494         text = trans(_(
    495             'This is to inform you that you have been provisionally'
    496             ' admitted into ${a} as follows:', mapping = {'a': inst_name}),
    497             portal_language)
    498         html = format_html(text)
     501        html = format_html(self._admissionText())
    499502        data.append(Paragraph(html, NOTE_STYLE))
    500503        data.append(Spacer(1, 20))
Note: See TracChangeset for help on using the changeset viewer.