From 669aa2f6c6fc7a6b38ac4f2c5f696a483999336e Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Tue, 29 Mar 2022 10:15:24 +0200 Subject: [PATCH] Add customer language and timezone fields to the appointments modal (#1094) --- application/controllers/Calendar.php | 1 + .../views/components/appointments_modal.php | 25 ++++++++++++++++++ .../views/components/timezone_dropdown.php | 4 +-- assets/js/components/appointments_modal.js | 26 ++++++++++++++----- assets/js/utils/calendar_default_view.js | 4 +++ assets/js/utils/calendar_table_view.js | 2 ++ 6 files changed, 54 insertions(+), 8 deletions(-) diff --git a/application/controllers/Calendar.php b/application/controllers/Calendar.php index f8795f40..81c8ef40 100644 --- a/application/controllers/Calendar.php +++ b/application/controllers/Calendar.php @@ -137,6 +137,7 @@ class Calendar extends EA_Controller { 'user_display_name' => $this->accounts->get_user_display_name($user_id), 'timezone' => session('timezone'), 'timezones' => $this->timezones->to_array(), + 'grouped_timezones' => $this->timezones->to_grouped_array(), 'privileges' => $privileges, 'calendar_view' => $calendar_view, 'available_providers' => $available_providers, diff --git a/application/views/components/appointments_modal.php b/application/views/components/appointments_modal.php index 67b1310b..295636c2 100644 --- a/application/views/components/appointments_modal.php +++ b/application/views/components/appointments_modal.php @@ -243,6 +243,20 @@ + +
+ + +
@@ -281,6 +295,17 @@ maxlength="120"/>
+
+ + 'id="timezone" class="form-control required"', + 'grouped_timezones' => vars('grouped_timezones') + ]) ?> +
+