Ignore:
Timestamp:
21 Nov 2019, 06:43:08 (5 years ago)
Author:
Henrik Bettermann
Message:

Make max passport picture size customizable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/fileviewlets.py

    r15652 r15833  
    2222from waeup.kofa.interfaces import MessageFactory as _
    2323from waeup.kofa.interfaces import (
    24     IExtFileStore, IFileStoreNameChooser, IKofaObject)
     24    IExtFileStore, IFileStoreNameChooser, IKofaObject, IKofaUtils)
    2525from waeup.kofa.utils.helpers import string_from_bytes, file_size
    2626from waeup.kofa.browser import DEFAULT_IMAGE_PATH
     
    107107    grok.template('imageupload')
    108108    label = _(u'Passport Picture (jpg only)')
    109     mus = 1024 * 50
    110109    download_name = u'passport.jpg'
    111110    tab_redirect = '#tab2'
     111
     112    @property
     113    def mus(self):
     114        kofa_utils = getUtility(IKofaUtils)
     115        return kofa_utils.MAX_PASSPORT_SIZE
    112116
    113117
Note: See TracChangeset for help on using the changeset viewer.