Ignore:
Timestamp:
6 Nov 2013, 16:26:50 (11 years ago)
Author:
Henrik Bettermann
Message:

See r10706.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/students/browser.py

    r10264 r10707  
    3535    ExportPDFBedTicketSlipPage,
    3636    StudentFilesUploadPage, emit_lock_message)
     37from waeup.kofa.students.interfaces import IStudentsUtils
    3738from waeup.kofa.students.viewlets import (
    3839    PaymentReceiptActionButton, StudentPassportActionButton)
     
    215216    @property
    216217    def target_url(self):
     218        # Passport pictures must not be editable if application slip
     219        # exists.
    217220        slip = getUtility(IExtFileStore).getFileByContext(
    218221            self.context, 'application_slip')
    219         if self.context.state != ADMITTED or slip is not None:
     222        PWCHANGE_STATES = getUtility(IStudentsUtils).PWCHANGE_STATES
     223        if self.context.state not in PWCHANGE_STATES or slip is not None:
    220224            return ''
    221225        return self.view.url(self.view.context, self.target)
     
    229233
    230234    def update(self):
     235        # Passport pictures must not be editable if application slip
     236        # exists.
    231237        slip = getUtility(IExtFileStore).getFileByContext(
    232238            self.context, 'application_slip')
    233         if self.context.state != ADMITTED or slip is not None:
     239        PWCHANGE_STATES = getUtility(IStudentsUtils).PWCHANGE_STATES
     240        if self.context.state not in PWCHANGE_STATES or slip is not None:
    234241            emit_lock_message(self)
    235242            return
Note: See TracChangeset for help on using the changeset viewer.