From 1c82a10ebeac06882c948e74bb94edb6f8a14495 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 20 Jan 2017 17:25:51 +0100 Subject: [PATCH] =?utf8?q?Einkaufsrechnungen:=20keine=20Multibox=20f=C3=BC?= =?utf8?q?r=20Steuersatzauswahl?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/ir.pl | 2 +- templates/webpages/ir/form_header.html | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index d4a42a78d..593d290ab 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -270,7 +270,7 @@ sub form_header { $form->get_lists("projects" => { "key" => "ALL_PROJECTS", "all" => 0, "old_id" => \@old_project_ids }, - "taxzones" => "ALL_TAXZONES", + "taxzones" => ($form->{id} ? "ALL_TAXZONES" : "ALL_ACTIVE_TAXZONES"), "currencies" => "ALL_CURRENCIES", "vendors" => "ALL_VENDORS", "departments" => "all_departments", diff --git a/templates/webpages/ir/form_header.html b/templates/webpages/ir/form_header.html index 75ffde5d4..427e57004 100644 --- a/templates/webpages/ir/form_header.html +++ b/templates/webpages/ir/form_header.html @@ -107,13 +107,10 @@ [% 'Steuersatz' | $T8 %] - [%- INCLUDE 'generic/multibox.html' - name = 'taxzone_id' - style = 'width: 250px' - DATA = ALL_TAXZONES - id_key = 'id' - readonly = (id ? 1 : 0) - label_key = 'description' -%] + [% L.select_tag('taxzone_id', ( id ? ALL_TAXZONES : ALL_ACTIVE_TAXZONES) , default = taxzone_id, title_key = 'description', disabled = (id ? 1 : 0), style='width: 250px', onchange = "document.getElementById('update_button').click();") %] + [%- IF id %] + + [%- END %] [%- IF id %] -- 2.20.1