From 0a50b37cde825744889a90cb21cc9e0c2c2d47c6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Mon, 9 May 2016 14:11:55 +0200 Subject: [PATCH] Rechnungsmasken auf dispatcher Mechanismus umgestellt --- bin/mozilla/is.pl | 15 ++++++++++ templates/webpages/is/form_footer.html | 40 +++++++++++++------------- 2 files changed, 35 insertions(+), 20 deletions(-) diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index fa5e31903..07ec02986 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -1174,3 +1174,18 @@ sub e_mail { $main::lxdebug->leave_sub(); } + +sub dispatcher { + for my $action (qw( + print update ship_to e_mail storno post_payment use_as_new credit_note + delete post order preview post_and_e_mail print_and_post save_draft + mark_as_paid + )) { + if ($::form->{"action_$action"}) { + call_sub($action); + return; + } + } + + $::form->error($::locale->text('No action defined.')); +} diff --git a/templates/webpages/is/form_footer.html b/templates/webpages/is/form_footer.html index 741d7ad8f..3212a4f42 100644 --- a/templates/webpages/is/form_footer.html +++ b/templates/webpages/is/form_footer.html @@ -154,40 +154,40 @@

[% print_options %]

- + [% IF id %] - - - - + + + + [% IF show_storno %] - [% L.submit_tag("action", LxERP.t8("Storno"), "data-require-transaction-description"=INSTANCE_CONF.get_require_transaction_description_ps, confirm=LxERP.t8('Do you really want to cancel this invoice?')) %] + [% L.submit_tag("action_storno", LxERP.t8("Storno"), "data-require-transaction-description"=INSTANCE_CONF.get_require_transaction_description_ps, confirm=LxERP.t8('Do you really want to cancel this invoice?')) %] [% END %] - - + + [% IF id && !is_type_credit_note %] - + [% END %] [% IF show_delete && (!storno || storno_id) %] - + [% END %] [% IF show_delete && !storno %] - + [% END %] - + [% ELSE # no id %] [% UNLESS locked %] - - - - - - - + + + + + + + [%- END %] [% END # id %] @@ -195,7 +195,7 @@ [%#- button for saving history %] [% IF INSTANCE_CONF.get_is_show_mark_as_paid %] - + [% END %] [% END %] -- 2.20.1