# $locale->text('Vendor deleted!')
# $locale->text('Cannot delete vendor!')
-use CGI::Ajax;
use POSIX qw(strftime);
use SL::CT;
$form->{taxzone_id} = 0 if !$form->{id};
$form->{jsscript} = 1;
$form->{fokus} = "ct.greeting";
- $form->{AJAX} = [ new CGI::Ajax( map {; "get_$_" => "$form->{script}?action=get_$_" } qw(delivery) ) ];
$form->{SHIPTO_ALL} = [ +{ shipto_id => '0', shiptoname => $::locale->text('All') }, @{ $form->{SHIPTO} } ];
$form->{title} = $form->{title_save}
<table>
<tr>
<th align="right">[% 'Shipping Address' | $T8 %]</th>
- <td>
- [%- INCLUDE generic/multibox.html
- name = 'delivery_id',
- id = 'delivery_id',
- DATA = SHIPTO_ALL,
- onChange = "get_delivery(['shipto_id__' + this.value, 'from__' + from.value, 'to__' + to.value, 'id__' + cvid.value, 'db__' + db.value], ['delivery'])",
- id_key = 'shipto_id',
- label_sub = 'shipto_label',
- show_empty = 1,
- -%]
+ <td colspan="3">
+ [% L.select_tag('delivery_id', L.options_for_select(SHIPTO_ALL, title_sub => \shipto_label, with_empty => 1),
+ onchange => "\$('#delivery').load('ct.pl?action=get_delivery&id=' + \$('#cvid').attr('value') + '&db=' + \$('#db').attr('value') + '&shipto_id=' + this.value)") %]
</td>
</tr>
[%- USE T8 %]
[% USE HTML %][% USE LxERP %]
+<div id="delivery">
<table width="100%">
<tr>
<td>
[%- IF DELIVERY.size == 15 %]
<p>[% 'This list is capped at 15 items to keep it fast. If you need a full list, please use reports.' | $T8 %]</p>
[%- END %]
+</div>