Changeset 6718


Ignore:
Timestamp:
12 Sep 2011, 09:32:21 (13 years ago)
Author:
Henrik Bettermann
Message:

Lock student clearance form if clearence_locked attribute is set and emit lock message.

File:
1 edited

Legend:

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

    r6717 r6718  
    604604    pnav = 4
    605605    form_fields['date_of_birth'].custom_widget = FriendlyDateWidget('le-year')
     606
     607    def emitLockMessage(self):
     608        self.flash('The requested form is locked (read-only).')
     609        self.redirect(self.url(self.context))
     610        return
     611
     612    def update(self):
     613        if self.context.clearance_locked:
     614            self.emitLockMessage()
     615            return
     616        datepicker.need()
     617        return super(StudentClearanceEditFormPage, self).update()
Note: See TracChangeset for help on using the changeset viewer.