From 8704413c0ff34846f0ba740f7409511b9d8f168d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Se=CC=81bastien?= Date: Fri, 5 Jun 2020 17:29:35 +0200 Subject: [PATCH] Do not add bookAdvanceTimeout delay to new appointment modal on the backend. --- application/controllers/Backend.php | 1 - application/views/backend/calendar.php | 1 - assets/js/backend_calendar_appointments_modal.js | 4 ++-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/application/controllers/Backend.php b/application/controllers/Backend.php index f6c4e589..8eb7867a 100755 --- a/application/controllers/Backend.php +++ b/application/controllers/Backend.php @@ -99,7 +99,6 @@ class Backend extends CI_Controller { $view['base_url'] = $this->config->item('base_url'); $view['user_display_name'] = $this->user_model->get_user_display_name($this->session->userdata('user_id')); $view['active_menu'] = PRIV_APPOINTMENTS; - $view['book_advance_timeout'] = $this->settings_model->get_setting('book_advance_timeout'); $view['date_format'] = $this->settings_model->get_setting('date_format'); $view['time_format'] = $this->settings_model->get_setting('time_format'); $view['first_weekday'] = $this->settings_model->get_setting('first_weekday'); diff --git a/application/views/backend/calendar.php b/application/views/backend/calendar.php index b8f0a7e1..d6622937 100755 --- a/application/views/backend/calendar.php +++ b/application/views/backend/calendar.php @@ -17,7 +17,6 @@ 'availableProviders' : , 'availableServices' : , 'baseUrl' : , - 'bookAdvanceTimeout' : , 'dateFormat' : , 'timeFormat' : , 'firstWeekday' : , diff --git a/assets/js/backend_calendar_appointments_modal.js b/assets/js/backend_calendar_appointments_modal.js index 7eb0db61..ce95c325 100755 --- a/assets/js/backend_calendar_appointments_modal.js +++ b/assets/js/backend_calendar_appointments_modal.js @@ -390,8 +390,8 @@ window.BackendCalendarAppointmentsModal = window.BackendCalendarAppointmentsModa var duration = service ? service.duration : 0; - var startDatetime = new Date().addMinutes(GlobalVariables.bookAdvanceTimeout); - var endDatetime = new Date().addMinutes(GlobalVariables.bookAdvanceTimeout).addMinutes(duration); + var startDatetime = new Date(); + var endDatetime = new Date().addMinutes(duration); var dateFormat; switch (GlobalVariables.dateFormat) {