From: Moritz Bunkus Date: Mon, 23 Jan 2017 10:37:48 +0000 (+0100) Subject: Angebote/Aufträge: Währungsauswahl via L.select_tag X-Git-Tag: release-3.5.4~1667^2~15 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=e286e6ca8a50f39829a4a83ab30b951ba2fd1329;p=kivitendo-erp.git Angebote/Aufträge: Währungsauswahl via L.select_tag --- 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 %]