From 47df98d0e6c7d8aa36cf4354acc4fc07301fb21e Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Wed, 25 Jan 2017 15:06:58 +0100 Subject: [PATCH] ActionBar: Verwendung bei Zahlungsein-/-ausgang --- bin/mozilla/cp.pl | 21 +++++++++++++++++++++ templates/webpages/cp/form_footer.html | 5 ----- templates/webpages/cp/form_header.html | 2 +- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/bin/mozilla/cp.pl b/bin/mozilla/cp.pl index 2bc2c1aa9..606025392 100644 --- a/bin/mozilla/cp.pl +++ b/bin/mozilla/cp.pl @@ -38,6 +38,7 @@ use SL::IR; use SL::AR; use SL::AP; use Data::Dumper; +use SL::Locale::String qw(t8); use strict; #use warnings; @@ -126,6 +127,8 @@ sub form_header { # $locale->text('AR') # $locale->text('AP') + setup_cp_form_action_bar(can_post => !!$form->{rowcount}); + $form->header; $arap = lc $form->{ARAP}; @@ -396,3 +399,21 @@ sub check_form { $lxdebug->leave_sub(); } + +sub setup_cp_form_action_bar { + my (%params) = @_; + + for my $bar ($::request->layout->get('actionbar')) { + $bar->add( + action => [ + t8('Update'), + submit => [ '#form', { action => "update" } ], + accesskey => 'enter', + ], + action => [ + t8('Post'), + submit => [ '#form', { action => "post" } ], + ], + ); + } +} diff --git a/templates/webpages/cp/form_footer.html b/templates/webpages/cp/form_footer.html index e67510586..3cca0eae3 100644 --- a/templates/webpages/cp/form_footer.html +++ b/templates/webpages/cp/form_footer.html @@ -5,9 +5,4 @@ - -
- - - diff --git a/templates/webpages/cp/form_header.html b/templates/webpages/cp/form_header.html index 4b519b8b0..c41ec96c8 100644 --- a/templates/webpages/cp/form_header.html +++ b/templates/webpages/cp/form_header.html @@ -2,7 +2,7 @@ [%- USE HTML %] [%- USE T8 %] [%- USE LxERP %][%- USE P -%] -
+ [% SET vc_id = vc _ '_id' style = "width: 250px" %] -- 2.20.1