From b00a823df1621586116bfddc8a97ea4924b3c566 Mon Sep 17 00:00:00 2001 From: mDeflotte Date: Wed, 18 Apr 2012 09:59:52 +0000 Subject: [PATCH] [-] BO : #PSTEST-977 - Cart rule, hide unavailable options git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@14725 b9a71923-0436-4b27-9f14-aed3839534dd --- .../template/controllers/cart_rules/actions.tpl | 2 +- .../default/template/controllers/cart_rules/form.js | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/cart_rules/actions.tpl b/admin-dev/themes/default/template/controllers/cart_rules/actions.tpl index 03aa39d6b..bb505837c 100644 --- a/admin-dev/themes/default/template/controllers/cart_rules/actions.tpl +++ b/admin-dev/themes/default/template/controllers/cart_rules/actions.tpl @@ -89,7 +89,7 @@
 
-
+
{$gift_product_attribute_select} diff --git a/admin-dev/themes/default/template/controllers/cart_rules/form.js b/admin-dev/themes/default/template/controllers/cart_rules/form.js index 4a1eb4b7b..cb72e3ef0 100644 --- a/admin-dev/themes/default/template/controllers/cart_rules/form.js +++ b/admin-dev/themes/default/template/controllers/cart_rules/form.js @@ -112,8 +112,10 @@ function toggleApplyDiscount(percent, amount, apply_to) $('#apply_discount_percent_div').show(400); if ($('#apply_discount_to_product').attr('checked')) toggleApplyDiscountTo(); - $('#apply_discount_to_cheapest').removeAttr('disabled'); - $('#apply_discount_to_selection').removeAttr('disabled'); + $('#apply_discount_to_cheapest').show(); + $('*[for=apply_discount_to_cheapest]').show(); + $('#apply_discount_to_selection').show(); + $('*[for=apply_discount_to_selection]').show(); } else { @@ -126,9 +128,11 @@ function toggleApplyDiscount(percent, amount, apply_to) $('#apply_discount_amount_div').show(400); if ($('#apply_discount_to_product').attr('checked')) toggleApplyDiscountTo(); - $('#apply_discount_to_cheapest').attr('disabled', 'disabled'); + $('#apply_discount_to_cheapest').hide(); + $('*[for=apply_discount_to_cheapest]').hide(); $('#apply_discount_to_cheapest').removeAttr('checked'); - $('#apply_discount_to_selection').attr('disabled', 'disabled'); + $('#apply_discount_to_selection').hide(); + $('*[for=apply_discount_to_selection]').hide(); $('#apply_discount_to_selection').removeAttr('checked'); } else