Added timezone handling for users in the backend section.

This commit is contained in:
Alex Tselegidis 2020-03-29 14:10:49 +02:00
parent 5847728fd2
commit 1e5a1e59ea
6 changed files with 29 additions and 1 deletions

View file

@ -130,6 +130,11 @@
<input id="zip-code" class="form-control">
</div>
<div class="form-group">
<label for="timezone"><?= lang('timezone') ?></label>
<?= render_timezone_dropdown('id="timezone" class="form-control"') ?>
</div>
<div class="form-group">
<label class="control-label" for="notes"><?= lang('notes') ?></label>
<textarea id="notes" rows="4" class="form-control"></textarea>

View file

@ -181,6 +181,11 @@
<input type="password" id="provider-password-confirm" class="form-control required" maxlength="512">
</div>
<div class="form-group">
<label for="provider-timezone"><?= lang('timezone') ?></label>
<?= render_timezone_dropdown('id="provider-timezone" class="form-control"') ?>
</div>
<div class="form-group">
<label for="provider-calendar-view"><?= lang('calendar') ?> *</label>
<select id="provider-calendar-view" class="form-control required">
@ -413,6 +418,11 @@
<input type="password" id="secretary-password-confirm" class="form-control required" maxlength="512">
</div>
<div class="form-group">
<label for="secretary-timezone"><?= lang('timezone') ?></label>
<?= render_timezone_dropdown('id="secretary-timezone" class="form-control"') ?>
</div>
<div class="form-group">
<label for="secretary-calendar-view"><?= lang('calendar') ?> *</label>
<select id="secretary-calendar-view" class="form-control required">
@ -568,6 +578,11 @@
<input type="password" id="admin-password-confirm" class="form-control required" maxlength="512">
</div>
<div class="form-group">
<label for="admin-timezone"><?= lang('timezone') ?></label>
<?= render_timezone_dropdown('id="admin-timezone" class="form-control"') ?>
</div>
<div class="form-group">
<label for="admin-calendar-view"><?= lang('calendar') ?> *</label>
<select id="admin-calendar-view" class="form-control required">

View file

@ -151,7 +151,8 @@
address: $('#address').val(),
city: $('#city').val(),
zip_code: $('#zip-code').val(),
notes: $('#notes').val()
notes: $('#notes').val(),
timezone: $('#timezone').val()
};
if ($('#customer-id').val() != '') {
@ -314,6 +315,7 @@
$('#city').val(customer.city);
$('#zip-code').val(customer.zip_code);
$('#notes').val(customer.notes);
$('#timezone').val(customer.timezone);
$('#customer-appointments').empty();
$.each(customer.appointments, function (index, appointment) {

View file

@ -147,6 +147,7 @@
state: $('#admin-state').val(),
zip_code: $('#admin-zip-code').val(),
notes: $('#admin-notes').val(),
timezone: $('#admin-timezone').val(),
settings: {
username: $('#admin-username').val(),
notifications: $('#admin-notifications').hasClass('active'),
@ -324,6 +325,7 @@
$('#admin-state').val(admin.state);
$('#admin-zip-code').val(admin.zip_code);
$('#admin-notes').val(admin.notes);
$('#admin-timezone').val(admin.timezone);
$('#admin-username').val(admin.settings.username);
$('#admin-calendar-view').val(admin.settings.calendar_view);

View file

@ -159,6 +159,7 @@
state: $('#provider-state').val(),
zip_code: $('#provider-zip-code').val(),
notes: $('#provider-notes').val(),
timezone: $('#provider-timezone').val(),
settings: {
username: $('#provider-username').val(),
working_plan: JSON.stringify(BackendUsers.wp.get()),
@ -391,6 +392,7 @@
$('#provider-state').val(provider.state);
$('#provider-zip-code').val(provider.zip_code);
$('#provider-notes').val(provider.notes);
$('#provider-timezone').val(provider.timezone);
$('#provider-username').val(provider.settings.username);
$('#provider-calendar-view').val(provider.settings.calendar_view);

View file

@ -152,6 +152,7 @@
state: $('#secretary-state').val(),
zip_code: $('#secretary-zip-code').val(),
notes: $('#secretary-notes').val(),
timezone: $('#secretary-timezone').val(),
settings: {
username: $('#secretary-username').val(),
notifications: $('#secretary-notifications').hasClass('active'),
@ -340,6 +341,7 @@
$('#secretary-state').val(secretary.state);
$('#secretary-zip-code').val(secretary.zip_code);
$('#secretary-notes').val(secretary.notes);
$('#secretary-timezone').val(secretary.timezone);
$('#secretary-username').val(secretary.settings.username);
$('#secretary-calendar-view').val(secretary.settings.calendar_view);