From ed45862002de7481692e3044553356857f947d5f Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 30 Jan 2017 16:41:34 +0100 Subject: [PATCH] ActionBar: Verwendung bei Mandantenkonfiguration --- SL/Controller/ClientConfig.pm | 15 +++++++++++++++ templates/webpages/client_config/form.html | 8 +------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/SL/Controller/ClientConfig.pm b/SL/Controller/ClientConfig.pm index a222a39f1..f85f10e38 100644 --- a/SL/Controller/ClientConfig.pm +++ b/SL/Controller/ClientConfig.pm @@ -214,10 +214,25 @@ sub edit_form { $::request->layout->use_javascript("${_}.js") for qw(jquery.selectboxes jquery.multiselect2side kivi.File); + $self->setup_edit_form_action_bar; $self->render('client_config/form', title => t8('Client Configuration'), make_chart_title => sub { $_[0]->accno . '--' . $_[0]->description }, make_templates_value => sub { 'templates/' . $_[0] }, ); } +sub setup_edit_form_action_bar { + my ($self) = @_; + + for my $bar ($::request->layout->get('actionbar')) { + $bar->add( + action => [ + t8('Save'), + submit => [ '#form', { action => 'ClientConfig/save' } ], + accesskey => 'enter', + ], + ); + } +} + 1; diff --git a/templates/webpages/client_config/form.html b/templates/webpages/client_config/form.html index eb6714c09..7ed61ac51 100644 --- a/templates/webpages/client_config/form.html +++ b/templates/webpages/client_config/form.html @@ -79,7 +79,7 @@ $(function() { [% PROCESS 'common/flash.html' %] -
+
  • [% LxERP.t8('Miscellaneous') %]
  • @@ -108,10 +108,4 @@ $(function() { [% PROCESS 'client_config/_warehouse.html' %] [% PROCESS 'client_config/_features.html' %] [% PROCESS 'client_config/_miscellaneous.html' %] - -
    - [%- L.hidden_tag('action', 'ClientConfig/dispatch') %] - [%- L.submit_tag('action_save', LxERP.t8('Save')) %] -
    - -- 2.20.1