WIP : Refactor contraint/rule becomes conditions (more generic)
This commit is contained in:
@@ -90,12 +90,15 @@ $(function($){
|
||||
// Save rules on click
|
||||
$.couponManager.onClickSaveRule = function() {
|
||||
$('#constraint-save-btn').on('click', function () {
|
||||
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 ?");
|
||||
console.log('constraint-save-btn');
|
||||
if($('#category-rule').val() == 'thelia.condition.match_for_everyone') {
|
||||
// // @todo translate + modal
|
||||
var r = confirm("Do you really want to set this coupon available to everyone ?");
|
||||
if (r == true) {
|
||||
$.couponManager.createOrUpdateRuleAjax();
|
||||
}
|
||||
} else {
|
||||
$.couponManager.createOrUpdateRuleAjax();
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user