X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fcp.pl;h=6060253928121bea6f758606de0b24ff9692be3a;hb=3f543918661fff33eaa79d3b19e6d6c777973a28;hp=2bc2c1aa906e580ad7ef04d68b97fe9120fc5a7f;hpb=aa63ebae1c0a758ec438c594acb328b1f0e5e001;p=kivitendo-erp.git 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" } ], + ], + ); + } +}