Changeset 17880 for main


Ignore:
Timestamp:
10 Aug 2024, 21:19:24 (5 months ago)
Author:
Henrik Bettermann
Message:

Add affidavit of good behavior upload components.

Location:
main/waeup.uniben/trunk/src/waeup/uniben/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/students/browser.py

    r17870 r17880  
    11591159        'date_of_birth', 'entry_session', 'current_mode',
    11601160        'flash_notice')
     1161
     1162class StudentAffidavitUploadPage(KofaPage):
     1163    """View to upload scanned affidavit of good behavior by student.
     1164    """
     1165    grok.context(ICustomStudent)
     1166    grok.name('affidavit_upload')
     1167    grok.require('waeup.uploadStudentFile')
     1168    grok.template('affidavituploadpage')
     1169    label = _('Upload affidavit of good behavior')
     1170    deletion_warning = _('Are you sure?')
     1171    pnav = 4
  • main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py

    r17822 r17880  
    2727    ExportPDFClearanceSlip, StudyCourseDisplayFormPage,
    2828    StudyLevelDisplayFormPage, StudentClearanceDisplayFormPage,
    29     StudentBaseDisplayFormPage, OnlinePaymentDisplayFormPage)
     29    StudentBaseDisplayFormPage, StudentBaseManageFormPage,
     30    OnlinePaymentDisplayFormPage)
    3031from waeup.kofa.students.viewlets import (
    3132    RequestTranscriptActionButton,
     
    3738    ICustomStudent, ICustomStudentOnlinePayment)
    3839
    39 from waeup.uniben.students.browser import StudentMedicalHistoryEditFormPage
     40from waeup.uniben.students.browser import (
     41    StudentMedicalHistoryEditFormPage, StudentAffidavitUploadPage)
    4042
    4143from kofacustom.nigeria.interfaces import MessageFactory as _
     
    261263    icon = 'actionicon_nigeria.png'
    262264
     265class StudentAffidavitUploadActionButton(ManageActionButton):
     266    grok.order(14)
     267    grok.context(ICustomStudent)
     268    grok.view(StudentBaseDisplayFormPage)
     269    grok.require('waeup.handleStudent')
     270    icon = 'actionicon_signature.png'
     271    text = _('Upload affidavit of good behavior')
     272    target = 'affidavit_upload'
     273
     274class AffidavitDisplay(StudentFileDisplay):
     275    """Affidavit of Good Behavior display viewlet.
     276    """
     277    grok.order(10)
     278    grok.context(ICustomStudent)
     279    grok.view(StudentBaseDisplayFormPage)
     280    grok.require('waeup.viewStudent')
     281    label = _(u'Scanned Affidavit of Good Behavior')
     282    download_name = u'affidavit.pdf'
     283
     284class AffidavitUploadManage(StudentFileUpload):
     285    """Affidavit of Good Behavior upload viewlet for officers.
     286    """
     287    grok.order(10)
     288    grok.context(ICustomStudent)
     289    grok.view(StudentBaseManageFormPage)
     290    grok.require('waeup.manageStudent')
     291    label = _(u'Scanned Affidavit of Good Behavior (pdf only)')
     292    download_name = u'affidavit.pdf'
     293
     294class AffidavitUploadEdit(AffidavitUploadManage):
     295    """Affidavit of Good Behavior upload viewlet for students.
     296    """
     297    grok.view(StudentAffidavitUploadPage)
     298    grok.require('waeup.uploadStudentFile')
     299
     300class FinalClearance(StudentImage):
     301    """Renders pdf slip.
     302    """
     303    grok.name('affidavit.pdf')
     304    download_name = u'affidavit'
     305
     306    @property
     307    def add_id(self):
     308        return self.context.student_id
     309
    263310# JAMB Letter
    264311
Note: See TracChangeset for help on using the changeset viewer.