From be93a00277661e40caa4bcf8a5eb8a4dae160b16 Mon Sep 17 00:00:00 2001 From: Vincent Augagneur Date: Fri, 2 Aug 2013 17:29:15 +0200 Subject: [PATCH] //new place for validate and add new range && global range validation part 1 on carrier wizard --- .../carrier_wizard/helpers/form/form.tpl | 5 +- .../helpers/form/form_ranges.tpl | 6 +- .../carrier_wizard/helpers/view/view.tpl | 2 + .../admin/AdminCarrierWizardController.php | 26 +++--- js/admin_carrier_wizard.js | 86 +++++++++++-------- 5 files changed, 72 insertions(+), 53 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/form.tpl b/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/form.tpl index 55507c655..0a716c23e 100644 --- a/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/form.tpl @@ -31,8 +31,11 @@ {block name="field"} {if $input.name == 'zones'} {include file='controllers/carrier_wizard/helpers/form/form_ranges.tpl'} +
- {l s='Add new range'} + {l s='Add new range'}
{/if} {if $input.name == 'logo'} diff --git a/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/form_ranges.tpl b/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/form_ranges.tpl index 54a5d1d4a..0f1dbafa2 100644 --- a/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/form_ranges.tpl +++ b/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/form/form_ranges.tpl @@ -3,7 +3,7 @@ - + {foreach from=$ranges key=r item=range} {foreachelse} @@ -12,7 +12,7 @@ - + {foreach from=$ranges key=r item=range} {foreachelse} @@ -25,12 +25,10 @@ {foreach from=$ranges key=r item=range} {foreachelse} {/foreach} diff --git a/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/view/view.tpl b/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/view/view.tpl index 1acba9e6a..8a6ff6d5c 100644 --- a/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/view/view.tpl +++ b/admin-dev/themes/default/template/controllers/carrier_wizard/helpers/view/view.tpl @@ -39,6 +39,8 @@ var delete_range_confirm = '{l s='Are you sure to delete this range ?' js=1}'; var currency_sign = '{$currency_sign}'; var PS_WEIGHT_UNIT = '{$PS_WEIGHT_UNIT}'; + var invalid_range = '{l s='This range is not valid' js=1}'; + var range_is_overlapping = '{l s='Ranges are overlapping' js=1}';
'); - $('tr.fees_all td:last').after(''); $('tr.fees').each( function () { $(this).children('td:last').after(''); }); $('tr.delete_range td:last').after('
>=>=*  {$PS_WEIGHT_UNIT}  {$currency_sign}
<<*  {$PS_WEIGHT_UNIT}  {$currency_sign} - {if $range.id_range == -1} {/if} -
*   '+currency_sign+'