Working : Coupon - update loop

This commit is contained in:
gmorel
2013-09-12 21:34:50 +02:00
parent 58ef39769c
commit 964355e60d
7 changed files with 206 additions and 13 deletions

View File

@@ -78,7 +78,14 @@ $(function($){
// Save rules on click
couponManager.onClickSaveRule = function() {
$('#constraint-save-btn').on('click', function () {
couponManager.createOrUpdateRuleAjax();
if($('#category-rule').val() == 'thelia.constraint.rule.available_for_everyone') {
// @todo translate + modal
var r= confirm("Do you really want to set this coupon available to everyone ?");
if (r == true) {
couponManager.createOrUpdateRuleAjax();
}
}
});
};
couponManager.onClickSaveRule();