Changeset 8137


Ignore:
Timestamp:
12 Apr 2012, 20:39:44 (13 years ago)
Author:
Henrik Bettermann
Message:

Define required scans.

File:
1 edited

Legend:

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

    r8129 r8137  
    1818import grok
    1919from zope.formlib.textwidgets import BytesDisplayWidget
     20from zope.component import getUtility
    2021from waeup.kofa.widgets.datewidget import (
    2122    FriendlyDateWidget, FriendlyDateDisplayWidget
    2223    )
     24from waeup.kofa.interfaces import IExtFileStore
    2325from waeup.kofa.students.browser import (
    2426    StudentPersonalDisplayFormPage,
     
    164166        return form_fields
    165167
     168    def dataNotComplete(self):
     169        store = getUtility(IExtFileStore)
     170        if not store.getFileByContext(self.context, attr=u'birth_certicicate.jpg'):
     171            return _('No birth certificate uploaded.')
     172        if not store.getFileByContext(self.context, attr=u'ref_let.jpg'):
     173            return _('No referee letter uploaded.')
     174        if not store.getFileByContext(self.context, attr=u'acc_let.jpg'):
     175            return _('No acceptance letter uploaded.')
     176        if not store.getFileByContext(self.context, attr=u'fst_sit_scan.jpg'):
     177            return _('No first sitting result uploaded.')
     178        return False
     179
Note: See TracChangeset for help on using the changeset viewer.