Adjust manage mode handling in booking page

This commit is contained in:
Alex Tselegidis 2023-01-14 10:08:06 +01:00
parent 8879fa7889
commit 59170af997
3 changed files with 3 additions and 3 deletions

View file

@ -422,7 +422,7 @@ class Booking extends EA_Controller {
$captcha = request('captcha'); $captcha = request('captcha');
$appointment = $post_data['appointment']; $appointment = $post_data['appointment'];
$customer = $post_data['customer']; $customer = $post_data['customer'];
$manage_mode = isset($post_data['manage_mode']) && $post_data['manage_mode']; $manage_mode = filter_var($post_data['manage_mode'], FILTER_VALIDATE_BOOLEAN);
if ( ! array_key_exists('address', $customer)) if ( ! array_key_exists('address', $customer))
{ {

View file

@ -247,7 +247,7 @@ App.Http.Booking = (function () {
service_id: serviceId, service_id: serviceId,
selected_date: encodeURIComponent(selectedDateString), selected_date: encodeURIComponent(selectedDateString),
csrf_token: vars('csrf_token'), csrf_token: vars('csrf_token'),
manage_mode: App.Pages.Booking.manageMode, manage_mode: Number(App.Pages.Booking.manageMode),
appointment_id: appointmentId appointment_id: appointmentId
}; };

View file

@ -719,7 +719,7 @@ App.Pages.Booking = (function () {
id_services: $selectService.val() id_services: $selectService.val()
}; };
data.manage_mode = manageMode; data.manage_mode = Number(manageMode);
if (manageMode) { if (manageMode) {
data.appointment.id = vars('appointment_data').id; data.appointment.id = vars('appointment_data').id;