From 91dff1efa6b0736caee4093f5e829929772f58db Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Tue, 26 Jul 2022 17:12:06 +0300 Subject: [PATCH] Set default values for the user options --- assets/js/pages/admins.js | 1 + assets/js/pages/providers.js | 8 +++++--- assets/js/pages/secretaries.js | 1 + assets/js/pages/services.js | 1 + 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/assets/js/pages/admins.js b/assets/js/pages/admins.js index d8ec0d24..ec702380 100644 --- a/assets/js/pages/admins.js +++ b/assets/js/pages/admins.js @@ -338,6 +338,7 @@ App.Pages.Admins = (function () { $admins.find('.record-details #calendar-view').val('default'); $admins.find('.record-details #language').val('english'); $admins.find('.record-details #timezone').val('UTC'); + $admins.find('.record-details #notifications').prop('checked', true); $('#edit-admin, #delete-admin').prop('disabled', true); $('#admins .is-invalid').removeClass('is-invalid'); diff --git a/assets/js/pages/providers.js b/assets/js/pages/providers.js index f22bbf7e..fc9f4270 100755 --- a/assets/js/pages/providers.js +++ b/assets/js/pages/providers.js @@ -26,7 +26,7 @@ App.Pages.Providers = (function () { const $city = $('#city'); const $state = $('#state'); const $zipCode = $('#zip-code'); - const $private = $('#private'); + const $isPrivate = $('#is-private'); const $notes = $('#notes'); const $language = $('#language'); const $timezone = $('#timezone'); @@ -164,7 +164,7 @@ App.Pages.Providers = (function () { city: $city.val(), state: $state.val(), zip_code: $zipCode.val(), - is_private: Number($private.prop('checked')), + is_private: Number($isPrivate.prop('checked')), notes: $notes.val(), language: $language.val(), timezone: $timezone.val(), @@ -349,6 +349,8 @@ App.Pages.Providers = (function () { $providers.find('.record-details #calendar-view').val('default'); $providers.find('.record-details #language').val('english'); $providers.find('.record-details #timezone').val('UTC'); + $providers.find('.record-details #is-private').prop('checked', false); + $providers.find('.record-details #notifications').prop('checked', true); $providers.find('.add-break, .add-working-plan-exception, #reset-working-plan').prop('disabled', true); workingPlanManager.timepickers(true); @@ -386,7 +388,7 @@ App.Pages.Providers = (function () { $city.val(provider.city); $state.val(provider.state); $zipCode.val(provider.zip_code); - $private.prop('checked', provider.is_private); + $isPrivate.prop('checked', provider.is_private); $notes.val(provider.notes); $language.val(provider.language); $timezone.val(provider.timezone); diff --git a/assets/js/pages/secretaries.js b/assets/js/pages/secretaries.js index 19678a16..ef1bab66 100644 --- a/assets/js/pages/secretaries.js +++ b/assets/js/pages/secretaries.js @@ -347,6 +347,7 @@ App.Pages.Secretaries = (function () { $secretaries.find('.record-details .form-label span').prop('hidden', true); $secretaries.find('.record-details #calendar-view').val('default'); $secretaries.find('.record-details #timezone').val('UTC'); + $secretaries.find('.record-details #notifications').prop('checked', true); $secretaries.find('.add-edit-delete-group').show(); $secretaries.find('.save-cancel-group').hide(); $secretaries.find('.form-message').hide(); diff --git a/assets/js/pages/services.js b/assets/js/pages/services.js index 09297301..3fd4ad0b 100644 --- a/assets/js/pages/services.js +++ b/assets/js/pages/services.js @@ -268,6 +268,7 @@ App.Pages.Services = (function () { $services.find('.record-details').find('input, select, textarea').val('').prop('disabled', true); $services.find('.record-details .form-label span').prop('hidden', true); + $services.find('.record-details #is-private').prop('checked', false); $services.find('.record-details h3 a').remove(); $services.find('.add-edit-delete-group').show();