Ignore:
Timestamp:
2 Sep 2012, 07:20:56 (12 years ago)
Author:
Henrik Bettermann
Message:

Add onclick attribute to action buttons and protect the deactivate and activate buttons by a warning message.

File:
1 edited

Legend:

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

    r9138 r9145  
    190190        return self.view.url(self.view.context, self.target)
    191191
     192    @property
     193    def onclick(self):
     194        return "return window.confirm(%s);" % _(
     195            "'A history message will be added. Are you sure?'")
     196
    192197class StudentActivateActionButton(ManageActionButton):
    193198    grok.order(6)
     
    204209            return ''
    205210        return self.view.url(self.view.context, self.target)
     211
     212    @property
     213    def onclick(self):
     214        return "return window.confirm(%s);" % _(
     215            "'A history message will be added. Are you sure?'")
    206216
    207217class StudentClearanceManageActionButton(ManageActionButton):
Note: See TracChangeset for help on using the changeset viewer.