Set default values for the user options

This commit is contained in:
Alex Tselegidis 2022-07-26 17:12:06 +03:00
parent f6ad9bba25
commit 91dff1efa6
4 changed files with 8 additions and 3 deletions

View file

@ -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');

View file

@ -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);

View file

@ -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();

View file

@ -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();