forked from mirrors/easyappointments
Remove prefix from providers HTML elements
This commit is contained in:
parent
e23bdbb45f
commit
cacc84fd74
2 changed files with 58 additions and 58 deletions
|
@ -73,139 +73,139 @@
|
||||||
<div class="details-view tab-pane fade show active clearfix" id="details">
|
<div class="details-view tab-pane fade show active clearfix" id="details">
|
||||||
<h3><?= lang('details') ?></h3>
|
<h3><?= lang('details') ?></h3>
|
||||||
|
|
||||||
<input type="hidden" id="provider-id" class="record-id">
|
<input type="hidden" id="id" class="record-id">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="provider-details col-12 col-md-6">
|
<div class="details col-12 col-md-6">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="provider-first-name">
|
<label class="form-label" for="first-name">
|
||||||
<?= lang('first_name') ?>
|
<?= lang('first_name') ?>
|
||||||
<span class="text-danger">*</span>
|
<span class="text-danger">*</span>
|
||||||
</label>
|
</label>
|
||||||
<input id="provider-first-name" class="form-control required" maxlength="256">
|
<input id="first-name" class="form-control required" maxlength="256">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="provider-last-name">
|
<label class="form-label" for="last-name">
|
||||||
<?= lang('last_name') ?>
|
<?= lang('last_name') ?>
|
||||||
<span class="text-danger">*</span>
|
<span class="text-danger">*</span>
|
||||||
</label>
|
</label>
|
||||||
<input id="provider-last-name" class="form-control required" maxlength="512">
|
<input id="last-name" class="form-control required" maxlength="512">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="provider-email">
|
<label class="form-label" for="email">
|
||||||
<?= lang('email') ?>
|
<?= lang('email') ?>
|
||||||
<span class="text-danger">*</span>
|
<span class="text-danger">*</span>
|
||||||
</label>
|
</label>
|
||||||
<input id="provider-email" class="form-control required" max="512">
|
<input id="email" class="form-control required" max="512">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="provider-phone-number">
|
<label class="form-label" for="phone-number">
|
||||||
<?= lang('phone_number') ?>
|
<?= lang('phone_number') ?>
|
||||||
<span class="text-danger">*</span>
|
<span class="text-danger">*</span>
|
||||||
</label>
|
</label>
|
||||||
<input id="provider-phone-number" class="form-control required" max="128">
|
<input id="phone-number" class="form-control required" max="128">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="provider-mobile-number">
|
<label class="form-label" for="mobile-number">
|
||||||
<?= lang('mobile_number') ?>
|
<?= lang('mobile_number') ?>
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<input id="provider-mobile-number" class="form-control" maxlength="128">
|
<input id="mobile-number" class="form-control" maxlength="128">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="provider-address">
|
<label class="form-label" for="address">
|
||||||
<?= lang('address') ?>
|
<?= lang('address') ?>
|
||||||
</label>
|
</label>
|
||||||
<input id="provider-address" class="form-control" maxlength="256">
|
<input id="address" class="form-control" maxlength="256">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="provider-city">
|
<label class="form-label" for="city">
|
||||||
<?= lang('city') ?>
|
<?= lang('city') ?>
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<input id="provider-city" class="form-control" maxlength="256">
|
<input id="city" class="form-control" maxlength="256">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="provider-state">
|
<label class="form-label" for="state">
|
||||||
<?= lang('state') ?>
|
<?= lang('state') ?>
|
||||||
</label>
|
</label>
|
||||||
<input id="provider-state" class="form-control" maxlength="256">
|
<input id="state" class="form-control" maxlength="256">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="provider-zip-code">
|
<label class="form-label" for="zip-code">
|
||||||
<?= lang('zip_code') ?>
|
<?= lang('zip_code') ?>
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<input id="provider-zip-code" class="form-control" maxlength="64">
|
<input id="zip-code" class="form-control" maxlength="64">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="provider-notes">
|
<label class="form-label" for="notes">
|
||||||
<?= lang('notes') ?>
|
<?= lang('notes') ?>
|
||||||
</label>
|
</label>
|
||||||
<textarea id="provider-notes" class="form-control" rows="3"></textarea>
|
<textarea id="notes" class="form-control" rows="3"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="provider-settings col-12 col-md-6">
|
<div class="settings col-12 col-md-6">
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="provider-username">
|
<label class="form-label" for="username">
|
||||||
<?= lang('username') ?>
|
<?= lang('username') ?>
|
||||||
<span class="text-danger">*</span>
|
<span class="text-danger">*</span>
|
||||||
</label>
|
</label>
|
||||||
<input id="provider-username" class="form-control required" maxlength="256">
|
<input id="username" class="form-control required" maxlength="256">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="provider-password">
|
<label class="form-label" for="password">
|
||||||
<?= lang('password') ?>
|
<?= lang('password') ?>
|
||||||
<span class="text-danger">*</span>
|
<span class="text-danger">*</span>
|
||||||
</label>
|
</label>
|
||||||
<input type="password" id="provider-password" class="form-control required"
|
<input type="password" id="password" class="form-control required"
|
||||||
maxlength="512" autocomplete="new-password">
|
maxlength="512" autocomplete="new-password">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="provider-password-confirm">
|
<label class="form-label" for="password-confirm">
|
||||||
<?= lang('retype_password') ?>
|
<?= lang('retype_password') ?>
|
||||||
<span class="text-danger">*</span>
|
<span class="text-danger">*</span>
|
||||||
</label>
|
</label>
|
||||||
<input type="password" id="provider-password-confirm"
|
<input type="password" id="password-confirm"
|
||||||
class="form-control required" maxlength="512"
|
class="form-control required" maxlength="512"
|
||||||
autocomplete="new-password">
|
autocomplete="new-password">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="provider-calendar-view">
|
<label class="form-label" for="calendar-view">
|
||||||
<?= lang('calendar') ?>
|
<?= lang('calendar') ?>
|
||||||
<span class="text-danger">*</span>
|
<span class="text-danger">*</span>
|
||||||
</label>
|
</label>
|
||||||
<select id="provider-calendar-view" class="form-control required">
|
<select id="calendar-view" class="form-control required">
|
||||||
<option value="default">Default</option>
|
<option value="default">Default</option>
|
||||||
<option value="table">Table</option>
|
<option value="table">Table</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="provider-timezone">
|
<label class="form-label" for="timezone">
|
||||||
<?= lang('timezone') ?>
|
<?= lang('timezone') ?>
|
||||||
<span class="text-danger">*</span>
|
<span class="text-danger">*</span>
|
||||||
</label>
|
</label>
|
||||||
<?= render_timezone_dropdown('id="provider-timezone" class="form-control required"') ?>
|
<?= render_timezone_dropdown('id="timezone" class="form-control required"') ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
<div class="form-check form-switch me-4">
|
<div class="form-check form-switch me-4">
|
||||||
<input class="form-check-input" type="checkbox" id="provider-notifications">
|
<input class="form-check-input" type="checkbox" id="notifications">
|
||||||
<label class="form-check-label" for="provider-notifications">
|
<label class="form-check-label" for="notifications">
|
||||||
<?= lang('receive_notifications') ?>
|
<?= lang('receive_notifications') ?>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -16,23 +16,23 @@
|
||||||
*/
|
*/
|
||||||
App.Pages.Providers = (function () {
|
App.Pages.Providers = (function () {
|
||||||
const $providers = $('#providers');
|
const $providers = $('#providers');
|
||||||
const $id = $('#provider-id');
|
const $id = $('#id');
|
||||||
const $firstName = $('#provider-first-name');
|
const $firstName = $('#first-name');
|
||||||
const $lastName = $('#provider-last-name');
|
const $lastName = $('#last-name');
|
||||||
const $email = $('#provider-email');
|
const $email = $('#email');
|
||||||
const $mobileNumber = $('#provider-mobile-number');
|
const $mobileNumber = $('#mobile-number');
|
||||||
const $phoneNumber = $('#provider-phone-number');
|
const $phoneNumber = $('#phone-number');
|
||||||
const $address = $('#provider-address');
|
const $address = $('#address');
|
||||||
const $city = $('#provider-city');
|
const $city = $('#city');
|
||||||
const $state = $('#provider-state');
|
const $state = $('#state');
|
||||||
const $zipCode = $('#provider-zip-code');
|
const $zipCode = $('#zip-code');
|
||||||
const $notes = $('#provider-notes');
|
const $notes = $('#notes');
|
||||||
const $timezone = $('#provider-timezone');
|
const $timezone = $('#timezone');
|
||||||
const $username = $('#provider-username');
|
const $username = $('#username');
|
||||||
const $password = $('#provider-password');
|
const $password = $('#password');
|
||||||
const $passwordConfirmation = $('#provider-password-confirm');
|
const $passwordConfirmation = $('#password-confirm');
|
||||||
const $notifications = $('#provider-notifications');
|
const $notifications = $('#notifications');
|
||||||
const $calendarView = $('#provider-calendar-view');
|
const $calendarView = $('#calendar-view');
|
||||||
const $filterProviders = $('#filter-providers');
|
const $filterProviders = $('#filter-providers');
|
||||||
let filterResults = {};
|
let filterResults = {};
|
||||||
let filterLimit = 20;
|
let filterLimit = 20;
|
||||||
|
@ -89,7 +89,7 @@ App.Pages.Providers = (function () {
|
||||||
$providers.find('.add-edit-delete-group').hide();
|
$providers.find('.add-edit-delete-group').hide();
|
||||||
$providers.find('.save-cancel-group').show();
|
$providers.find('.save-cancel-group').show();
|
||||||
$providers.find('.record-details').find('input, select, textarea').prop('disabled', false);
|
$providers.find('.record-details').find('input, select, textarea').prop('disabled', false);
|
||||||
$('#provider-password, #provider-password-confirm').addClass('required');
|
$('#password, #password-confirm').addClass('required');
|
||||||
$providers
|
$providers
|
||||||
.find(
|
.find(
|
||||||
'.add-break, .edit-break, .delete-break, .add-working-plan-exception, .edit-working-plan-exception, .delete-working-plan-exception, #reset-working-plan'
|
'.add-break, .edit-break, .delete-break, .add-working-plan-exception, .edit-working-plan-exception, .delete-working-plan-exception, #reset-working-plan'
|
||||||
|
@ -112,7 +112,7 @@ App.Pages.Providers = (function () {
|
||||||
$filterProviders.find('button').prop('disabled', true);
|
$filterProviders.find('button').prop('disabled', true);
|
||||||
$filterProviders.find('.results').css('color', '#AAA');
|
$filterProviders.find('.results').css('color', '#AAA');
|
||||||
$providers.find('.record-details').find('input, select, textarea').prop('disabled', false);
|
$providers.find('.record-details').find('input, select, textarea').prop('disabled', false);
|
||||||
$('#provider-password, #provider-password-confirm').removeClass('required');
|
$('#password, #password-confirm').removeClass('required');
|
||||||
$('#provider-services input:checkbox').prop('disabled', false);
|
$('#provider-services input:checkbox').prop('disabled', false);
|
||||||
$providers
|
$providers
|
||||||
.find(
|
.find(
|
||||||
|
@ -285,12 +285,12 @@ App.Pages.Providers = (function () {
|
||||||
|
|
||||||
// Validate passwords.
|
// Validate passwords.
|
||||||
if ($password.val() !== $passwordConfirmation.val()) {
|
if ($password.val() !== $passwordConfirmation.val()) {
|
||||||
$('#provider-password, #provider-password-confirm').addClass('is-invalid');
|
$('#password, #password-confirm').addClass('is-invalid');
|
||||||
throw new Error(lang('passwords_mismatch'));
|
throw new Error(lang('passwords_mismatch'));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($password.val().length < vars('min_password_length') && $password.val() !== '') {
|
if ($password.val().length < vars('min_password_length') && $password.val() !== '') {
|
||||||
$('#provider-password, #provider-password-confirm').addClass('is-invalid');
|
$('#password, #password-confirm').addClass('is-invalid');
|
||||||
throw new Error(lang('password_length_notice').replace('$number', MIN_PASSWORD_LENGTH));
|
throw new Error(lang('password_length_notice').replace('$number', MIN_PASSWORD_LENGTH));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -325,8 +325,8 @@ App.Pages.Providers = (function () {
|
||||||
$providers.find('.save-cancel-group').hide();
|
$providers.find('.save-cancel-group').hide();
|
||||||
$providers.find('.record-details h3 a').remove();
|
$providers.find('.record-details h3 a').remove();
|
||||||
$providers.find('.record-details').find('input, select, textarea').val('').prop('disabled', true);
|
$providers.find('.record-details').find('input, select, textarea').val('').prop('disabled', true);
|
||||||
$providers.find('.record-details #provider-calendar-view').val('default');
|
$providers.find('.record-details #calendar-view').val('default');
|
||||||
$providers.find('.record-details #provider-timezone').val('UTC');
|
$providers.find('.record-details #timezone').val('UTC');
|
||||||
$providers.find('.add-break, .add-working-plan-exception, #reset-working-plan').prop('disabled', true);
|
$providers.find('.add-break, .add-working-plan-exception, #reset-working-plan').prop('disabled', true);
|
||||||
|
|
||||||
workingPlanManager.timepickers(true);
|
workingPlanManager.timepickers(true);
|
||||||
|
|
Loading…
Reference in a new issue