Fix JS
This commit is contained in:
parent
4c7e86fa9b
commit
771ed47ff4
2 changed files with 5 additions and 5 deletions
2
public/js/ajax.js
vendored
2
public/js/ajax.js
vendored
File diff suppressed because one or more lines are too long
8
resources/js/ajax.js
vendored
8
resources/js/ajax.js
vendored
|
|
@ -48,6 +48,9 @@ $('#addCoupons').on('click', function(event){
|
|||
|
||||
|
||||
$('body').on('click', '.delete-coupon', function(event){
|
||||
var campid = $(this).attr('data-campid');
|
||||
var couponid = $(this).attr('data-couponid');
|
||||
var trLinked = $(this).parent().parent();
|
||||
$.fancyConfirm({
|
||||
title : "<i class='fas fa-times-circle'></i> Retrait",
|
||||
message : "Êtes-vous sûr de vouloir retirer ce coupon de cette campagne ?",
|
||||
|
|
@ -56,15 +59,12 @@ $('body').on('click', '.delete-coupon', function(event){
|
|||
callback : function (value) {
|
||||
if (value) {
|
||||
event.preventDefault();
|
||||
var campid = $(this).attr('data-campid');
|
||||
var couponid = $(this).attr('data-couponid');
|
||||
var trLinked = $(this).parent().parent();
|
||||
|
||||
$.ajaxSetup({
|
||||
headers: {
|
||||
'X-CSRF-TOKEN': $('#csrf').val()
|
||||
}
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
url: '/remove-coupons-ajax',
|
||||
type: 'POST',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue