diff --git a/templates/backOffice/default/assets/js/coupon.js b/templates/backOffice/default/assets/js/coupon.js index dae6d9574..1c7d962eb 100644 --- a/templates/backOffice/default/assets/js/coupon.js +++ b/templates/backOffice/default/assets/js/coupon.js @@ -214,10 +214,10 @@ $(function($){ // *********************************************** $.couponManager.displayEfffect = function(optionSelected) { - var mainDiv = $('#coupon-type'); - mainDiv.find('.typeToolTip').html(optionSelected.data('description')); + var typeDiv = $('#coupon-type'); + typeDiv.find('.typeToolTip').html(optionSelected.data('description')); - var inputsDiv = mainDiv.find('.inputs'); + var inputsDiv = $('.inputs', $('#coupon-inputs')); inputsDiv.html('
'); var url = $.couponManager.urlAjaxAdminCouponDrawInputs; url = url.replace('couponServiceId', optionSelected.val()); @@ -248,11 +248,11 @@ $(function($){ // Reload effect inputs when changing effect $.couponManager.onEffectChange = function() { - var mainDiv = $('#coupon-type'); - var optionSelected = mainDiv.find('#type option:selected'); - mainDiv.find('.typeToolTip').html(optionSelected.data('description')); + var typeDiv = $('#coupon-type'); + var optionSelected = typeDiv.find('#type option:selected'); + typeDiv.find('.typeToolTip').html(optionSelected.data('description')); - mainDiv.find('#type').on('change', function () { + typeDiv.find('#type').on('change', function () { var optionSelected = $('option:selected', this); $.couponManager.displayEfffect(optionSelected); diff --git a/templates/backOffice/default/coupon/form.html b/templates/backOffice/default/coupon/form.html index bdb8b7226..cc39b6574 100644 --- a/templates/backOffice/default/coupon/form.html +++ b/templates/backOffice/default/coupon/form.html @@ -54,7 +54,31 @@ {if $error}{$message}{/if} {/form_field} + +
+
+ {form_field form=$form field='type'} +
+ + + {if $error}{$message}{/if} + {$availableCoupons.0.toolTip} +
+ {/form_field} +
+
+ + +
+
{form_field form=$form field='isEnabled'}
-
- {form_field form=$form field='type'} -
- - - {if $error}{$message}{/if} - {$availableCoupons.0.toolTip} -
- {/form_field} - +
{$couponInputsHtml nofilter}