From: Moritz Bunkus Date: Tue, 19 May 2009 12:58:04 +0000 (+0000) Subject: Kundenauswahl via generic/multibox.html geregelt -- dadurch wird auch das ?-Popup... X-Git-Tag: release-2.6.0rc1~23 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=663c6340b726a362637aaf93d750e981bf6e4c75;p=kivitendo-erp.git Kundenauswahl via generic/multibox.html geregelt -- dadurch wird auch das ?-Popup-Fenster angezeigt. --- diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 9bc225e88..32d176ac8 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -354,25 +354,23 @@ sub form_header { |; - %labels = (); - @values = (); - foreach my $item (@{ $form->{"ALL_CUSTOMERS"} }) { - push(@values, $item->{name}.qq|--|.$item->{"id"}); - $labels{$item->{name}.qq|--|.$item->{"id"}} = $item->{"name"}; - } - - $form->{selectcustomer} = ($myconfig{vclimit} > scalar(@values)); + $form->{selectcustomer} = $myconfig{vclimit} > scalar(@{ $form->{ALL_CUSTOMERS} }); my $customers = qq| | . $locale->text('Customer') . qq| - | . - (($myconfig{vclimit} <= scalar(@values)) - ? qq|| - : (NTI($cgi->popup_menu('-name' => 'customer', '-default' => $form->{oldcustomer}, - '-onChange' => 'document.getElementById(\'update_button\').click();', - '-values' => \@values, '-labels' => \%labels, '-style' => 'width: 250px')))) . qq| - - |; + | + . $form->parse_html_template('generic/multibox', + { 'name' => 'customer', + 'style' => 'width: 250px', + 'DATA' => $form->{ALL_CUSTOMERS}, + 'id_sub' => 'vc_keys', + 'vc_keys' => sub { "$_[0]->{name}--$_[0]->{id}" }, + 'label_key' => 'name', + 'select' => 'customer_or_vendor_selection_window(\'customer\', \'\', 0, 0);', + 'limit' => $myconfig{vclimit}, + 'allow_textbox' => 1, + 'onChange' => "document.getElementById('update_button').click();" }) + . qq| |; %labels = (); @values = (""); @@ -591,7 +589,7 @@ sub form_header { - +