From 89725e75c05d921b7efbb35132218921d033719b Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Mon, 18 Jul 2016 23:46:15 +0200 Subject: [PATCH] Added calendar-view setting in the UI (#182). --- src/application/models/Admins_model.php | 2 +- src/application/models/Providers_model.php | 2 +- src/application/models/Secretaries_model.php | 2 +- src/application/views/backend/settings.php | 8 +++++++ src/application/views/backend/users.php | 24 ++++++++++++++++++++ src/assets/js/backend_settings.js | 1 + src/assets/js/backend_settings_user.js | 3 ++- src/assets/js/backend_users_admins.js | 7 +++++- src/assets/js/backend_users_providers.js | 7 +++++- src/assets/js/backend_users_secretaries.js | 7 +++++- 10 files changed, 56 insertions(+), 7 deletions(-) diff --git a/src/application/models/Admins_model.php b/src/application/models/Admins_model.php index 0c371016..c2251b04 100644 --- a/src/application/models/Admins_model.php +++ b/src/application/models/Admins_model.php @@ -228,7 +228,7 @@ class Admins_Model extends CI_Model { // Validate calendar view mode. if (isset($admin['settings']['calendar_view']) && ($admin['settings']['calendar_view'] !== CALENDAR_VIEW_DEFAULT - || $admin['settings']['calendar_view'] !== CALENDAR_VIEW_TABLE)) { + && $admin['settings']['calendar_view'] !== CALENDAR_VIEW_TABLE)) { throw new Exception('The calendar view setting must be either "' . CALENDAR_VIEW_DEFAULT . '" or "' . CALENDAR_VIEW_TABLE . '", given: ' . $admin['settings']['calendar_view']); } diff --git a/src/application/models/Providers_model.php b/src/application/models/Providers_model.php index b11271a8..ad32717a 100644 --- a/src/application/models/Providers_model.php +++ b/src/application/models/Providers_model.php @@ -260,7 +260,7 @@ class Providers_Model extends CI_Model { // Validate calendar view mode. if (isset($provider['settings']['calendar_view']) && ($provider['settings']['calendar_view'] !== CALENDAR_VIEW_DEFAULT - || $provider['settings']['calendar_view'] !== CALENDAR_VIEW_TABLE)) { + && $provider['settings']['calendar_view'] !== CALENDAR_VIEW_TABLE)) { throw new Exception('The calendar view setting must be either "' . CALENDAR_VIEW_DEFAULT . '" or "' . CALENDAR_VIEW_TABLE . '", given: ' . $provider['settings']['calendar_view']); } diff --git a/src/application/models/Secretaries_model.php b/src/application/models/Secretaries_model.php index 802a9bfd..5f019ab7 100644 --- a/src/application/models/Secretaries_model.php +++ b/src/application/models/Secretaries_model.php @@ -226,7 +226,7 @@ class Secretaries_Model extends CI_Model { // Validate calendar view mode. if (isset($secretary['settings']['calendar_view']) && ($secretary['settings']['calendar_view'] !== CALENDAR_VIEW_DEFAULT - || $secretary['settings']['calendar_view'] !== CALENDAR_VIEW_TABLE)) { + && $secretary['settings']['calendar_view'] !== CALENDAR_VIEW_TABLE)) { throw new Exception('The calendar view setting must be either "' . CALENDAR_VIEW_DEFAULT . '" or "' . CALENDAR_VIEW_TABLE . '", given: ' . $secretary['settings']['calendar_view']); } diff --git a/src/application/views/backend/settings.php b/src/application/views/backend/settings.php index da99dd1e..18a16a57 100644 --- a/src/application/views/backend/settings.php +++ b/src/application/views/backend/settings.php @@ -415,6 +415,14 @@ +
+ + +
+