From 93f70996821f84b1a372de0b7066b5d6ea3c5c87 Mon Sep 17 00:00:00 2001 From: MrGuillou Date: Wed, 6 Aug 2014 12:47:36 +0200 Subject: [PATCH] Multiple ajax call if multiple address Add test if input radio is checked on event listener "change" --- .../frontOffice/default/order-delivery.html | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/templates/frontOffice/default/order-delivery.html b/templates/frontOffice/default/order-delivery.html index bf661c555..b2b090fad 100644 --- a/templates/frontOffice/default/order-delivery.html +++ b/templates/frontOffice/default/order-delivery.html @@ -145,14 +145,16 @@ $('#delivery-module-list-block').load('{url path="/order/deliveryModuleList"}'); $('.js-change-delivery-address').change(function(e) { - $('#delivery-module-list-block').load( - '{url path="/order/deliveryModuleList"}', -{literal} - {country_id: $(this).data('country')} -{/literal} - ); + if (this.checked) { + $('#delivery-module-list-block').load( + '{url path="/order/deliveryModuleList"}', + {literal} + {country_id: $(this).data('country')} + {/literal} + ); + ) }); }); -{/block} \ No newline at end of file +{/block}