From 0e6f1598f759780785edb9e1952268d79ccfebc0 Mon Sep 17 00:00:00 2001 From: Vincent Augagneur Date: Mon, 29 Jul 2013 18:36:50 +0200 Subject: [PATCH] [-] BO : fixed some bug on carrier wizard - added tabindex on input - new default carrier img --- .../helpers/form/form_ranges.tpl | 1 + .../controllers/carrier_wizard/logo.tpl | 2 +- classes/Carrier.php | 2 +- .../admin/AdminCarrierWizardController.php | 40 +++++++++--------- css/admin.css | 4 +- img/admin/carrier-default.jpg | Bin 0 -> 2281 bytes js/admin_carrier_wizard.js | 30 +++++++++++-- 7 files changed, 53 insertions(+), 26 deletions(-) create mode 100644 img/admin/carrier-default.jpg 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 4908e2448..bbb20176f 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 @@ -1,3 +1,4 @@ +
diff --git a/admin-dev/themes/default/template/controllers/carrier_wizard/logo.tpl b/admin-dev/themes/default/template/controllers/carrier_wizard/logo.tpl index 05f4760d9..db611b901 100644 --- a/admin-dev/themes/default/template/controllers/carrier_wizard/logo.tpl +++ b/admin-dev/themes/default/template/controllers/carrier_wizard/logo.tpl @@ -24,7 +24,7 @@ *}
- +

diff --git a/classes/Carrier.php b/classes/Carrier.php index 3c3f5039a..b32a19397 100644 --- a/classes/Carrier.php +++ b/classes/Carrier.php @@ -1290,7 +1290,7 @@ class CarrierCore extends ObjectModel public function setGroups($groups, $delete = true) { if ($delete) - Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'carrier_group WHERE id_carrier = '.(int)$id_carrier); + Db::getInstance()->execute('DELETE FROM '._DB_PREFIX_.'carrier_group WHERE id_carrier = '.(int)$this->id); if (!count($groups)) return true; $sql = 'INSERT INTO '._DB_PREFIX_.'carrier_group (id_carrier, id_group) VALUES '; diff --git a/controllers/admin/AdminCarrierWizardController.php b/controllers/admin/AdminCarrierWizardController.php index b06664c6f..9081acad2 100644 --- a/controllers/admin/AdminCarrierWizardController.php +++ b/controllers/admin/AdminCarrierWizardController.php @@ -224,26 +224,6 @@ class AdminCarrierWizardControllerCore extends AdminController 'form' => array( 'id_form' => 'step_carrier_ranges', 'input' => array( - array( - 'type' => 'radio', - 'label' => $this->l('Apply shipping cost:'), - 'name' => 'is_free', - 'required' => false, - 'class' => 't', - 'values' => array( - array( - 'id' => 'is_free_off', - 'value' => 0, - 'label' => ''.$this->l('Yes').'' - ), - array( - 'id' => 'is_free_on', - 'value' => 1, - 'label' => ''.$this->l('No').'' - ) - ), - 'desc' => $this->l('Apply both regular shipping cost and product-specific shipping costs.') - ), array( 'type' => 'radio', 'label' => $this->l('Shipping and handling:'), @@ -265,6 +245,26 @@ class AdminCarrierWizardControllerCore extends AdminController ), 'desc' => $this->l('Include the shipping and handling costs in the carrier price.') ), + array( + 'type' => 'radio', + 'label' => $this->l('Apply shipping cost:'), + 'name' => 'is_free', + 'required' => false, + 'class' => 't', + 'values' => array( + array( + 'id' => 'is_free_off', + 'value' => 0, + 'label' => ''.$this->l('Yes').'' + ), + array( + 'id' => 'is_free_on', + 'value' => 1, + 'label' => ''.$this->l('No').'' + ) + ), + 'desc' => $this->l('Apply both regular shipping cost and product-specific shipping costs.') + ), array( 'type' => 'radio', 'label' => $this->l('Billing:'), diff --git a/css/admin.css b/css/admin.css index b67c2ede3..8cae37760 100644 --- a/css/admin.css +++ b/css/admin.css @@ -2517,4 +2517,6 @@ margin-bottom:7px; #carrier_wizard #zones_table input[type=text] {width: 45px;} -#carrier_logo_block{position: absolute;right: 15px;} \ No newline at end of file +#carrier_logo_block{position: absolute;right: 15px;} + +#carrier_wizard #fieldset_form { min-height: 190px} diff --git a/img/admin/carrier-default.jpg b/img/admin/carrier-default.jpg new file mode 100644 index 0000000000000000000000000000000000000000..5677b65c1ec721d8316277fdcd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J4LGP`HQALdmj#q})b)(o3beP>kJu%t!Qw;vC|yHLV3U#Ee)AHx0KZTr~Vi z{5j##&5E|Sc-9{VN6Pqa@z#{oJc4`1+)&;`E{!`=y*IlwufoCHVsy-Y|9oyg;nbd# zOxFvd&W z+)kx+Tz;mlRyks*cxJuH93L?b*0%rt~Q>>BT@Fwz4AwY0cc~ zOK0q;?%;1f2pz6t51QFZ~7iL&2N*l=l! zxPsA?SCKEl0lXGS>xWF{m9V748)#-lDqB*6PB@Zv~T@B?Q7HS8<~VJ%dzq5+SeoKOZ6$ anGG#gw^GRZ~wnY|N0jI^oKM6 literal 0 HcmV?d00001 diff --git a/js/admin_carrier_wizard.js b/js/admin_carrier_wizard.js index 71a943eff..ebeeff76f 100644 --- a/js/admin_carrier_wizard.js +++ b/js/admin_carrier_wizard.js @@ -214,6 +214,7 @@ function bind_inputs() $('tr.fees').each( function () { $(this).children('td:eq('+index+')').remove(); }); + rebuildTabindex(); return false; }); @@ -270,7 +271,7 @@ function bind_inputs() var is_free = $(this); $("#step_carrier_ranges .margin-form").each(function() { var field = $(this).children().attr('name'); - if (typeof(field) != 'undefined' && field != 'is_free') + if (typeof(field) != 'undefined' && field != 'is_free' && field != 'shipping_handling') { if (parseInt(is_free.val())) { @@ -294,6 +295,7 @@ function bind_inputs() $('#zones_table').show(); $('.new_range').show(); } + resizeWizard(); }); $('input[name="is_free"]:checked').click(); @@ -400,13 +402,14 @@ function add_new_range() $('tr.fees_all td:last').after('

'); + $(this).children('td:last').after(''); }); $('tr.delete_range td:last').after('