X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/b4c74fe9b236c5d86b8746ee4f3c32a9db07bdd7..663c6340b726a362637aaf93d750e981bf6e4c75:/bin/mozilla/is.pl
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 {
-
+