Revision 663c6340
Von Moritz Bunkus vor mehr als 15 Jahren hinzugefügt
bin/mozilla/is.pl | ||
---|---|---|
354 | 354 |
</tr>|; |
355 | 355 |
|
356 | 356 |
|
357 |
%labels = (); |
|
358 |
@values = (); |
|
359 |
foreach my $item (@{ $form->{"ALL_CUSTOMERS"} }) { |
|
360 |
push(@values, $item->{name}.qq|--|.$item->{"id"}); |
|
361 |
$labels{$item->{name}.qq|--|.$item->{"id"}} = $item->{"name"}; |
|
362 |
} |
|
363 |
|
|
364 |
$form->{selectcustomer} = ($myconfig{vclimit} > scalar(@values)); |
|
357 |
$form->{selectcustomer} = $myconfig{vclimit} > scalar(@{ $form->{ALL_CUSTOMERS} }); |
|
365 | 358 |
|
366 | 359 |
my $customers = qq| |
367 | 360 |
<th align="right">| . $locale->text('Customer') . qq|</th> |
368 |
<td>| . |
|
369 |
(($myconfig{vclimit} <= scalar(@values)) |
|
370 |
? qq|<input type="text" value="| . H($form->{customer}) . qq|" name="customer">| |
|
371 |
: (NTI($cgi->popup_menu('-name' => 'customer', '-default' => $form->{oldcustomer}, |
|
372 |
'-onChange' => 'document.getElementById(\'update_button\').click();', |
|
373 |
'-values' => \@values, '-labels' => \%labels, '-style' => 'width: 250px')))) . qq| |
|
374 |
<input type="button" value="| . $locale->text('Details (one letter abbreviation)') . qq|" onclick="show_vc_details('customer')"> |
|
375 |
</td>|; |
|
361 |
<td>| |
|
362 |
. $form->parse_html_template('generic/multibox', |
|
363 |
{ 'name' => 'customer', |
|
364 |
'style' => 'width: 250px', |
|
365 |
'DATA' => $form->{ALL_CUSTOMERS}, |
|
366 |
'id_sub' => 'vc_keys', |
|
367 |
'vc_keys' => sub { "$_[0]->{name}--$_[0]->{id}" }, |
|
368 |
'label_key' => 'name', |
|
369 |
'select' => 'customer_or_vendor_selection_window(\'customer\', \'\', 0, 0);', |
|
370 |
'limit' => $myconfig{vclimit}, |
|
371 |
'allow_textbox' => 1, |
|
372 |
'onChange' => "document.getElementById('update_button').click();" }) |
|
373 |
. qq| <input type="button" value="| . $locale->text('Details (one letter abbreviation)') . qq|" onclick="show_vc_details('customer')"></td>|; |
|
376 | 374 |
|
377 | 375 |
%labels = (); |
378 | 376 |
@values = (""); |
... | ... | |
591 | 589 |
<body onLoad="$onload"> |
592 | 590 |
<script type="text/javascript" src="js/common.js"></script> |
593 | 591 |
<script type="text/javascript" src="js/delivery_customer_selection.js"></script> |
594 |
<script type="text/javascript" src="js/vendor_selection.js"></script> |
|
592 |
<script type="text/javascript" src="js/customer_or_vendor_selection.js"></script>
|
|
595 | 593 |
<script type="text/javascript" src="js/calculate_qty.js"></script> |
596 | 594 |
<script type="text/javascript" src="js/follow_up.js"></script> |
597 | 595 |
|
Auch abrufbar als: Unified diff
Kundenauswahl via generic/multibox.html geregelt -- dadurch wird auch das ?-Popup-Fenster angezeigt.