X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=bin%2Fmozilla%2Fcp.pl;h=49c0e6ae19cfeb6e5b2a11c4d60f06784db20dc9;hb=1d1f31407ee1a66af5a0db0d10350bc29a371653;hp=d30acaf9b56c26e7bc2d2a7e9bd4ba39fc9d5978;hpb=02b31f9250ed39394490ed94a08c5e96cd767a65;p=kivitendo-erp.git diff --git a/bin/mozilla/cp.pl b/bin/mozilla/cp.pl index d30acaf9b..49c0e6ae1 100644 --- a/bin/mozilla/cp.pl +++ b/bin/mozilla/cp.pl @@ -38,10 +38,10 @@ use SL::IR; use SL::AR; use SL::AP; use Data::Dumper; +use SL::Locale::String qw(t8); use strict; #use warnings; -require "bin/mozilla/arap.pl"; require "bin/mozilla/common.pl"; our ($form, %myconfig, $lxdebug, $locale, $auth); @@ -103,7 +103,7 @@ sub form_header { $auth->assert('cash'); - $::request->layout->add_javascripts("autocomplete_customer.js"); + $::request->layout->add_javascripts("kivi.CustomerVendor.js"); my ($arap, $exchangerate); @@ -127,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}; @@ -397,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" } ], + ], + ); + } +}