Ignore:
Timestamp:
10 Jan 2021, 13:02:37 (4 years ago)
Author:
Henrik Bettermann
Message:

Add WAEC Results Scratch Card viewlets.py

Allow editing of passport images.

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

Legend:

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

    r16108 r16359  
    2222from reportlab.lib.styles import getSampleStyleSheet
    2323from waeup.kofa.browser.pdf import ENTRY1_STYLE
    24 from waeup.kofa.interfaces import (IKofaUtils,
     24from waeup.kofa.interfaces import (IKofaUtils, ADMITTED, CLEARANCE,
    2525    CLEARED, RETURNING, PAID, REGISTERED, VALIDATED, GRADUATED)
    2626from waeup.kofa.utils.helpers import to_timezone
     
    617617    #: A tuple containing the names of registration states in which changing of
    618618    #: passport pictures is allowed.
    619     PORTRAIT_CHANGE_STATES = ()
     619    PORTRAIT_CHANGE_STATES = (ADMITTED, CLEARANCE,)
    620620
    621621    # Uniben prefix
  • main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py

    r16130 r16359  
    214214    download_name = u'secr_cults'
    215215
     216# WAEC Results Scratch Card
     217
     218class WAECResultsScratchCardDisplay(StudentFileDisplay):
     219    """WAEC Results Scratch Card display viewlet.
     220    """
     221    grok.order(20)
     222    label = _(u'WAEC Results Scratch Card')
     223    title = _(u'WAEC Results Scratch Card')
     224    download_name = u'waec_sc'
     225
     226class WAECResultsScratchCardSlip(WAECResultsScratchCardDisplay):
     227    grok.view(ExportPDFClearanceSlip)
     228
     229class WAECResultsScratchCardUpload(StudentFileUpload):
     230    """WAEC Results Scratch Card upload viewlet.
     231    """
     232    grok.order(20)
     233    label = _(u'WAEC Results Scratch Card')
     234    title = _(u'WAEC Results Scratch Card Scan')
     235    mus = 1024 * 150
     236    download_name = u'waec_sc'
     237
     238class WAECResultsScratchCardImage(StudentImage):
     239    """Renders WAEC Results Scratch Card scan.
     240    """
     241    grok.name('waec_sc')
     242    download_name = u'waec_sc'
     243
    216244# Fingerprints
    217245
Note: See TracChangeset for help on using the changeset viewer.