Index: /main/waeup.kofa/trunk/CHANGES.txt
===================================================================
--- /main/waeup.kofa/trunk/CHANGES.txt	(revision 11436)
+++ /main/waeup.kofa/trunk/CHANGES.txt	(revision 11437)
@@ -4,4 +4,9 @@
 1.0.1dev (unreleased)
 =====================
+
+* 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.
 
 * jquery-ui.min.js is also used for tooltips.
Index: /main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py	(revision 11436)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py	(revision 11437)
@@ -47,5 +47,5 @@
 from waeup.kofa.browser.breadcrumbs import Breadcrumb
 from waeup.kofa.browser.layout import (
-    NullValidator, jsaction, action, UtilityView, JSAction)
+    NullValidator, jsaction, action, UtilityView)
 from waeup.kofa.browser.pages import (
     add_local_role, del_local_roles, doll_up, ExportCSVView)
@@ -64,15 +64,6 @@
 grok.context(IKofaObject) # Make IKofaObject the default context
 
-class SubmitJSAction(JSAction):
-
-    msg = _('\'You can not edit your application records after final submission.'
-            ' You really want to submit?\'')
-
-class submitaction(grok.action):
-
-    def __call__(self, success):
-        action = SubmitJSAction(self.label, success=success, **self.options)
-        self.actions.append(action)
-        return action
+WARNING = _('You can not edit your application records after final submission.'
+            ' You really want to submit?')
 
 class ApplicantsRootPage(KofaDisplayFormPage):
@@ -1033,5 +1024,5 @@
         return
 
-    @submitaction(_('Final Submit'))
+    @action(_('Final Submit'), warning=WARNING)
     def finalsubmit(self, **data):
         if self.upload_success is False:  # False is not None!
Index: /main/waeup.kofa/trunk/src/waeup/kofa/browser/layout.py
===================================================================
--- /main/waeup.kofa/trunk/src/waeup/kofa/browser/layout.py	(revision 11436)
+++ /main/waeup.kofa/trunk/src/waeup/kofa/browser/layout.py	(revision 11437)
@@ -69,10 +69,11 @@
 class KofaAction(Action):
 
-    def __init__(self, label, style='', **options):
+    def __init__(self, label, style='', tooltip='', warning='', **options):
         super(KofaAction, self).__init__(label, **options)
         self.style = style
+        self.tooltip = tooltip
+        self.warning = warning
         if style == '':
             self.style = 'default'
-        
 
     def render(self):
@@ -82,38 +83,30 @@
         if isinstance(label, Message):
             label = translate(self.label, context=self.form.request)
-        return ('<input type="submit" id="%s" name="%s" value="%s"'
-                ' class="btn btn-%s"/>' %
-                (self.__name__, self.__name__, escape(label, quote=True),
-                self.style))
+        if self.warning:
+            warning = translate(self.warning, context=self.form.request)
+            self.warning = ' onclick="return window.confirm(\'%s\')"' % warning
+        if self.tooltip:
+            tooltip = translate(self.tooltip, context=self.form.request)
+            self.tooltip = ' data-toggle="tooltip" title="%s"' % tooltip
+        if self.style:
+            style = ' class="btn btn-%s"' % self.style
+        else:
+            style = ' class="btn btn-default"'
+        html = ('<input type="submit" id="%s" name="%s" value="%s"' %
+                (self.__name__, self.__name__, escape(label, quote=True))
+                + style + self.tooltip + self.warning
+                + ' />')
+        return html
 
 class jsaction(grok.action):
 
+    msg = _('Are you sure?')
+
     def __call__(self, success):
-        action = JSAction(self.label, success=success, **self.options)
+        action = KofaAction(self.label,
+                            success=success, warning=self.msg,
+                            **self.options)
         self.actions.append(action)
         return action
-
-class JSAction(Action):
-
-    msg = _('\'Are you sure?\'')
-
-    def __init__(self, label, style='', **options):
-        super(JSAction, self).__init__(label, **options)
-        self.style = style
-        if style == '':
-            self.style = 'default'
-
-    def render(self):
-        if not self.available():
-            return ''
-        label = self.label
-        if isinstance(label, Message):
-            label = translate(self.label, context=self.form.request)
-        msg = translate(self.msg, context=self.form.request)
-        return ('<input type="submit" id="%s" name="%s" value="%s"'
-                ' class="btn btn-%s" onclick="return window.confirm(%s)" />' %
-                (self.__name__, self.__name__, escape(label, quote=True),
-                 self.style, msg)
-                )
 
 def NullValidator(*args, **kw):
