SL::DB::Object: Methode update_collections für One-To-Many-Relationships
[kivitendo-erp.git] / SL / Layout / ActionBar / Submit.pm
index 751a969..f3288c7 100644 (file)
@@ -3,24 +3,18 @@ package SL::Layout::ActionBar::Submit;
 use strict;
 use parent qw(SL::Layout::ActionBar::Action);
 
-use JSON;
-
-use Rose::Object::MakeMethods::Generic (
-  'scalar --get_set_init' => [ qw(text submit) ],
-);
+use SL::Presenter::Tag qw(html_tag);
 
 sub render {
-  $_[0]->p->html_tag('div', $_[0]->text,
+  html_tag('div', $_[0]->text,
     id    => $_[0]->id,
     class => 'layout-actionbar-action layout-actionbar-submit',
   );
 }
 
-sub script {
-  # store submit and form and stuff in data attribute
-  sprintf q|$('#%s').data('action', %s);|, $_[0]->id, JSON::to_json({
-    submit => $_[0]->submit,
-  });
+sub callable {
+  my ($self) = @_;
+  return $self->params->{submit} || $self->params->{call} || $self->params->{link};
 }
 
 1;