Fixed csrfToken problem with ajax_save_appointment request

This commit is contained in:
Alex Tselegidis 2015-05-27 23:52:11 +02:00
parent ad8c9b6522
commit ecbe5600df

View file

@ -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);