From e286e6ca8a50f39829a4a83ab30b951ba2fd1329 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 23 Jan 2017 11:37:48 +0100 Subject: [PATCH] =?utf8?q?Angebote/Auftr=C3=A4ge:=20W=C3=A4hrungsauswahl?= =?utf8?q?=20via=20L.select=5Ftag?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/mozilla/oe.pl | 8 -------- templates/webpages/oe/form_header.html | 4 +--- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index ebbc997b9..856276c6e 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -381,14 +381,8 @@ sub form_header { $TMPL_VAR{sales_employee_labels} = sub { $_[0]->{name} || $_[0]->{login} }; # currencies and exchangerate - my @values = map { $_ } @{ $form->{ALL_CURRENCIES} }; - my %labels = map { $_ => $_ } @{ $form->{ALL_CURRENCIES} }; $form->{currency} = $form->{defaultcurrency} unless $form->{currency}; $TMPL_VAR{show_exchangerate} = $form->{currency} ne $form->{defaultcurrency}; - $TMPL_VAR{currencies} = NTI($cgi->popup_menu('-name' => 'currency', '-default' => $form->{"currency"}, - '-values' => \@values, '-labels' => \%labels, - '-onchange' => "document.getElementById('update_button').click();" - )) if scalar @values; push @custom_hiddens, "forex"; push @custom_hiddens, "exchangerate" if $form->{forex}; @@ -1497,8 +1491,6 @@ sub invoice { require "bin/mozilla/$form->{script}"; - map { $form->{"select$_"} = "" } ($form->{vc}, "currency"); - my $currency = $form->{currency}; &invoice_links; diff --git a/templates/webpages/oe/form_header.html b/templates/webpages/oe/form_header.html index 83d1b6527..953cb1502 100644 --- a/templates/webpages/oe/form_header.html +++ b/templates/webpages/oe/form_header.html @@ -110,12 +110,10 @@ [%- END %] -[%- IF currencies %] [% 'Currency' | $T8 %] - [% currencies %] + [% L.select_tag("currency", ALL_CURRENCIES, value_key="name", default=currency, onchange="document.getElementById('update_button').click();") %] -[%- END %] [%- IF show_exchangerate %] [% 'Exchangerate' | $T8 %] -- 2.20.1