From ecbe5600df03ac970e4e743215d3b3be6e1e6860 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Wed, 27 May 2015 23:52:11 +0200 Subject: [PATCH] Fixed csrfToken problem with ajax_save_appointment request --- src/assets/js/backend_calendar.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/assets/js/backend_calendar.js b/src/assets/js/backend_calendar.js index dc869fd2..8bdd1853 100644 --- a/src/assets/js/backend_calendar.js +++ b/src/assets/js/backend_calendar.js @@ -1268,9 +1268,10 @@ var BackendCalendar = { saveAppointment: function(appointment, customer, successCallback, errorCallback) { var postUrl = GlobalVariables.baseUrl + '/index.php/backend_api/ajax_save_appointment'; - var postData = {}; - - postData['appointment_data'] = JSON.stringify(appointment); + var postData = { + 'csrfToken': GlobalVariables.csrfToken, + 'appointment_data': JSON.stringify(appointment) + }; if (customer !== undefined) { postData['customer_data'] = JSON.stringify(customer);