This commit is contained in:
Thibault Richy 2019-03-08 15:48:05 +01:00
parent 4c7e86fa9b
commit 771ed47ff4
2 changed files with 5 additions and 5 deletions

2
public/js/ajax.js vendored

File diff suppressed because one or more lines are too long

View file

@ -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',