Ignore:
Timestamp:
26 Feb 2014, 07:54:30 (11 years ago)
Author:
Henrik Bettermann
Message:
  • JSAction has been deprecated. KofaAction? can be used instead. Additional parameters can be used in @action decorators to enable tooltips and/or warning windows. The old @jsaction decorator still triggers a default warning message.
File:
1 edited

Legend:

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

    r11254 r11437  
    4747from waeup.kofa.browser.breadcrumbs import Breadcrumb
    4848from waeup.kofa.browser.layout import (
    49     NullValidator, jsaction, action, UtilityView, JSAction)
     49    NullValidator, jsaction, action, UtilityView)
    5050from waeup.kofa.browser.pages import (
    5151    add_local_role, del_local_roles, doll_up, ExportCSVView)
     
    6464grok.context(IKofaObject) # Make IKofaObject the default context
    6565
    66 class SubmitJSAction(JSAction):
    67 
    68     msg = _('\'You can not edit your application records after final submission.'
    69             ' You really want to submit?\'')
    70 
    71 class submitaction(grok.action):
    72 
    73     def __call__(self, success):
    74         action = SubmitJSAction(self.label, success=success, **self.options)
    75         self.actions.append(action)
    76         return action
     66WARNING = _('You can not edit your application records after final submission.'
     67            ' You really want to submit?')
    7768
    7869class ApplicantsRootPage(KofaDisplayFormPage):
     
    10331024        return
    10341025
    1035     @submitaction(_('Final Submit'))
     1026    @action(_('Final Submit'), warning=WARNING)
    10361027    def finalsubmit(self, **data):
    10371028        if self.upload_success is False:  # False is not None!
Note: See TracChangeset for help on using the changeset viewer.