Changeset 16292


Ignore:
Timestamp:
30 Oct 2020, 12:36:49 (4 years ago)
Author:
Henrik Bettermann
Message:

Redesign personal data slip completely.

Location:
main/kofacustom.iuokada/trunk/src/kofacustom/iuokada
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/tests/test_browser.py

    r16233 r16292  
    9393        self.browser.getControl(name="form.sex").value = ['m']
    9494        self.browser.getControl(name="form.email").value = 'xx@yy.zz'
     95        self.browser.getControl(name="form.perm_address").value = 'Adresse'
    9596
    9697    def test_manage_application(self):
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/interswitch/tests.py

    r16270 r16292  
    218218        self.browser.getControl(name="form.sex").value = ['m']
    219219        self.browser.getControl(name="form.email").value = 'xx@yy.zz'
     220        self.browser.getControl(name="form.perm_address").value = 'Adresse'
    220221
    221222    def setUp(self):
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/locales/en/LC_MESSAGES/waeup.kofa.po

    r16256 r16292  
    143143
    144144msgid "Personal Data of"
    145 msgstr "Registration Bio Data of"
     145msgstr "Course Registration Clearance of"
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/browser.py

    r16288 r16292  
    154154    """Deliver a PDF base and personal data slip.
    155155    """
     156    grok.name('course_registration_clearance.pdf')
    156157    omit_fields = (
    157158        'phone', 'email',
     
    164165    form_fields = grok.AutoFields(ICustomStudentPersonal)
    165166
     167    def _signatures(self):
     168        return ([('I certify that the above named student has satisfied the financial requirements for registration.', 'Name and Signature of Bursary Staff', '<br><br>')],
     169                [('I certify that the credentials of the student have been screened by me and the student is hereby cleared.', 'Name and Signature of Registry Staff', '<br><br>')],
     170                [('I certify that the above named student has registered with the Library.', 'Name and Signature of Library Staff', '<br><br>')],
     171                [('I certify that the above named student has been registered with the college. ', 'Name and Signature of College Officer', '<br><br>')],
     172                [('I certify that the above named student has completed his/her ICT registration. ', 'Name and Signature of ICT Staff', '<br><br>')],
     173                [('Eligibility/Congratulation Station', 'Name and Signature of Registrar', '')],
     174                )
     175
    166176    def render(self):
    167177        studentview = StudentBasePDFFormPage(self.context.student,
     
    169179        students_utils = getUtility(IStudentsUtils)
    170180
    171         watermark_path = os.path.join(
    172             os.path.dirname(__file__), 'static', 'watermark.pdf')
    173         watermark = open(watermark_path, 'rb')
    174         file_path = os.path.join(
    175             os.path.dirname(__file__), 'static', 'biodataPage2.pdf')
    176         file = open(file_path, 'rb')
    177         mergefiles = [file,]
     181        #watermark_path = os.path.join(
     182        #    os.path.dirname(__file__), 'static', 'watermark.pdf')
     183        #watermark = open(watermark_path, 'rb')
     184        #file_path = os.path.join(
     185        #    os.path.dirname(__file__), 'static', 'biodataPage2.pdf')
     186        #file = open(file_path, 'rb')
     187        #mergefiles = [file,]
     188
    178189        return students_utils.renderPDF(
    179             self, 'personal_slip.pdf',
     190            self, 'course_registration_clearance.pdf',
    180191            self.context.student, studentview,
    181192            omit_fields=self.omit_fields,
    182             mergefiles=mergefiles,
    183             watermark=watermark)
     193            signatures=self._signatures(),
     194            pagebreak=True,
     195        #    mergefiles=mergefiles,
     196        #    watermark=watermark
     197            )
    184198
    185199class CustomAccommodationDisplayFormPage(NigeriaAccommodationDisplayFormPage):
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/students/tests/test_browser.py

    r16264 r16292  
    158158        # Students can open base data slip
    159159        # (no button available in base package)
    160         pdf_url = '%s/personal_slip.pdf' % self.student_path
     160        pdf_url = '%s/course_registration_clearance.pdf' % self.student_path
    161161        self.browser.open(pdf_url)
    162162        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    163163        self.assertEqual(self.browser.headers['Content-Type'], 'application/pdf')
    164         path = os.path.join(samples_dir(), 'personal_slip.pdf')
     164        path = os.path.join(samples_dir(), 'course_registration_clearance.pdf')
    165165        open(path, 'wb').write(self.browser.contents)
    166         print "Sample PDF personal_slip.pdf written to %s" % path
     166        print "Sample PDF course_registration_clearance.pdf written to %s" % path
    167167
    168168    def test_student_admission_letter(self):
Note: See TracChangeset for help on using the changeset viewer.