Ignore:
Timestamp:
12 Oct 2018, 15:51:59 (6 years ago)
Author:
Henrik Bettermann
Message:

Add MedicalLaboratoryRequestForm?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.edopoly/trunk/src/kofacustom/edopoly/students/browser.py

    r15177 r15185  
    206206            self.context.student, omit_fields=self.omit_fields,
    207207            pre_text=pre_text, post_text='')
     208
     209class MedicalLaboratoryRequestForm(UtilityView, grok.View):
     210    """Deliver a PDF notification slip.
     211    """
     212    grok.context(ICustomStudent)
     213    grok.name('medical_laboratory_form.pdf')
     214    grok.require('waeup.viewStudent')
     215    prefix = 'form'
     216
     217    form_fields = grok.AutoFields(ICustomStudent).select(
     218        'student_id', 'matric_number', 'sex', 'email', 'phone', 'perm_address')
     219    omit_fields = ('current_mode')
     220
     221    label = u'Student\'s Medical Laboratory Request Form'
     222    title = u'Student\'s Medical Laboratory Request Form'
     223
     224    post_text = """
     225
     226Laboratory request: Student's Medical Test
     227
     228Lab Results/Status:
     229
     230Medical Laboratory Scientist's Sign.:
     231
     232
     233
     234Notice to all newly admitted students:
     235
     2361. Carry out your mandatory medical laboratory tests at:
     237(a) the Edo State Polyechnic Health Centre
     2382. Evidence of medical screening payment and the downloaded student's laboratory test request form are required for the medical tests to be conducted for students.
     2393. Collect your lab tests results and upload during clearance process online.
     2404. Students' admission records and clearance are incomplete without medical test result.
     2415. Results of medical tests from elsewhere are not accepted.
     2426. Medical tests are conducted only within admission period, and will end in matriculation week. Unnecessary delays will not be allowed.
     2437. This information applies to both full- time and part-time.
     244"""
     245
     246    def render(self):
     247        if not self.context.medical_fee_paid:
     248            self.flash('Not allowed.', type="danger")
     249            self.redirect(self.url(self.context))
     250            return
     251        students_utils = getUtility(IStudentsUtils)
     252        return students_utils.renderPDFAdmissionLetter(self,
     253            self.context.student, omit_fields=self.omit_fields,
     254            pre_text='', post_text=self.post_text)
Note: See TracChangeset for help on using the changeset viewer.