Changeset 10706


Ignore:
Timestamp:
6 Nov 2013, 10:56:11 (11 years ago)
Author:
Henrik Bettermann
Message:

We need to customize the states in which students can change their passport picture (portrait).

Location:
main/waeup.kofa/trunk/src/waeup/kofa/students
Files:
3 edited

Legend:

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

    r10694 r10706  
    23572357
    23582358    def update(self):
    2359         if self.context.student.state != ADMITTED:
     2359        PWCHANGE_STATES = getUtility(IStudentsUtils).PWCHANGE_STATES
     2360        if self.context.student.state not in PWCHANGE_STATES:
    23602361            emit_lock_message(self)
    23612362            return
  • main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py

    r10702 r10706  
    3434from waeup.kofa.interfaces import MessageFactory as _
    3535from waeup.kofa.students.interfaces import IStudentsUtils
     36from waeup.kofa.students.workflow import ADMITTED
    3637from waeup.kofa.browser.pdf import (
    3738    ENTRY1_STYLE, format_html, NOTE_STYLE, HEADING_STYLE,
     
    848849    SKIP_UPLOAD_VIEWLETS = ()
    849850
     851    PWCHANGE_STATES = (ADMITTED)
     852
    850853    #: A prefix used when generating new student ids. Each student id will
    851854    #: start with this string. The default is 'K' for ``Kofa``.
  • main/waeup.kofa/trunk/src/waeup/kofa/students/viewlets.py

    r10694 r10706  
    557557    @property
    558558    def target_url(self):
    559         if self.context.state != ADMITTED:
     559        PWCHANGE_STATES = getUtility(IStudentsUtils).PWCHANGE_STATES
     560        if self.context.state not in PWCHANGE_STATES:
    560561            return ''
    561562        return self.view.url(self.view.context, self.target)
Note: See TracChangeset for help on using the changeset viewer.