Ignore:
Timestamp:
1 Oct 2020, 06:54:58 (4 years ago)
Author:
Henrik Bettermann
Message:

Inject signature image into admission letter.

Location:
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/browser/pdf.py

    r15565 r16263  
    2121
    2222import os
     23from string import Template
    2324from waeup.kofa.browser.pdf import PDFCreator
    2425
     
    3435    watermark_pos = [45, 140]
    3536    logo_pos = [520, 630, 60]
     37
     38    signature_benji_img_path = os.path.join(
     39        os.path.dirname(__file__), 'static', 'benji_signature.png')
     40
     41    def _substitute_markers(self, text):
     42        """
     43        """
     44        text = Template(text)
     45        PDF_SIGNATURES =  {
     46            'signature_benji_img_path': self.signature_benji_img_path,
     47            }
     48        return text.safe_substitute(PDF_SIGNATURES)
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/browser.py

    r16260 r16263  
    382382Congratulations!
    383383
     384
     385
     386<img src="${signature_benji_img_path}" valign="-20" height="38" width="86" />
     387
    384388Friday Benji Bakare Esq.
    385389Registrar
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/tests/test_browser.py

    r16252 r16263  
    156156
    157157    def test_student_admission_letter(self):
    158         self.certificate.study_mode = 'pg_ft'
     158        self.certificate.study_mode = 'ug_ft'
    159159        # Student cant login if their password is not set
    160160        IWorkflowInfo(self.student).fireTransition('admit')
Note: See TracChangeset for help on using the changeset viewer.