From 792e0545e871695bb657a2790d488c6bb1fcf010 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Tue, 11 Jul 2023 07:44:25 +0200 Subject: [PATCH] Do not allow users to enable the Google Sync if "all" is selected --- assets/js/utils/calendar_default_view.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/js/utils/calendar_default_view.js b/assets/js/utils/calendar_default_view.js index b38e369e..557264c4 100755 --- a/assets/js/utils/calendar_default_view.js +++ b/assets/js/utils/calendar_default_view.js @@ -287,7 +287,7 @@ App.Utils.CalendarDefaultView = (function () { */ $selectFilterItem.on('change', () => { // If current value is service, then the sync buttons must be disabled. - if ($selectFilterItem.find('option:selected').attr('type') === FILTER_TYPE_SERVICE) { + if ($selectFilterItem.find('option:selected').attr('type') === FILTER_TYPE_SERVICE || $selectFilterItem.val() === 'all') { $('#google-sync, #enable-sync, #insert-appointment, #insert-dropdown').prop('disabled', true); fullCalendar.setOption('selectable', false); fullCalendar.setOption('editable', false);