From 59486b328d1d3b7ee01cfab020b5732581cbfb1c Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Fri, 22 Jul 2011 13:42:09 +0200 Subject: [PATCH] Lieferungentab mit jQuery & AJAX neu laden lassen, nicht via CGI::AJAX --- bin/mozilla/ct.pl | 2 -- templates/webpages/ct/form_header.html | 13 +++---------- templates/webpages/ct/get_delivery.html | 2 ++ 3 files changed, 5 insertions(+), 12 deletions(-) diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index 92ef085d4..cdb08529d 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -45,7 +45,6 @@ # $locale->text('Vendor deleted!') # $locale->text('Cannot delete vendor!') -use CGI::Ajax; use POSIX qw(strftime); use SL::CT; @@ -327,7 +326,6 @@ sub form_header { $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} diff --git a/templates/webpages/ct/form_header.html b/templates/webpages/ct/form_header.html index a09bfe33d..91d863678 100644 --- a/templates/webpages/ct/form_header.html +++ b/templates/webpages/ct/form_header.html @@ -317,16 +317,9 @@ - diff --git a/templates/webpages/ct/get_delivery.html b/templates/webpages/ct/get_delivery.html index 73d2154ec..921aaba50 100644 --- a/templates/webpages/ct/get_delivery.html +++ b/templates/webpages/ct/get_delivery.html @@ -1,5 +1,6 @@ [%- USE T8 %] [% USE HTML %][% USE LxERP %] +
[% 'Shipping Address' | $T8 %] - [%- 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, - -%] + + [% 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)") %]
@@ -39,3 +40,4 @@ [%- IF DELIVERY.size == 15 %]

[% 'This list is capped at 15 items to keep it fast. If you need a full list, please use reports.' | $T8 %]

[%- END %] + -- 2.20.1