forked from mirrors/easyappointments
Change the private field id attribute for consistency
This commit is contained in:
parent
181afcb4b9
commit
0576e69ad5
2 changed files with 29 additions and 22 deletions
|
@ -8,7 +8,7 @@
|
||||||
<form class="mb-4">
|
<form class="mb-4">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<input type="text" class="key form-control">
|
<input type="text" class="key form-control">
|
||||||
|
|
||||||
<button class="filter btn btn-outline-secondary" type="submit"
|
<button class="filter btn btn-outline-secondary" type="submit"
|
||||||
data-tippy-content="<?= lang('filter') ?>">
|
data-tippy-content="<?= lang('filter') ?>">
|
||||||
<i class="fas fa-search"></i>
|
<i class="fas fa-search"></i>
|
||||||
|
@ -63,15 +63,16 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="duration">
|
<label class="form-label" for="duration">
|
||||||
<?= lang('duration_minutes') ?>
|
<?= lang('duration_minutes') ?>
|
||||||
<span class="text-danger" hidden>*</span>
|
<span class="text-danger" hidden>*</span>
|
||||||
</label>
|
</label>
|
||||||
<input id="duration" class="form-control required" type="number" min="<?= EVENT_MINIMUM_DURATION ?>" disabled>
|
<input id="duration" class="form-control required" type="number" min="<?= EVENT_MINIMUM_DURATION ?>"
|
||||||
|
disabled>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="price">
|
<label class="form-label" for="price">
|
||||||
<?= lang('price') ?>
|
<?= lang('price') ?>
|
||||||
<span class="text-danger" hidden>*</span>
|
<span class="text-danger" hidden>*</span>
|
||||||
</label>
|
</label>
|
||||||
|
@ -79,7 +80,7 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="currency">
|
<label class="form-label" for="currency">
|
||||||
<?= lang('currency') ?>
|
<?= lang('currency') ?>
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
|
@ -87,14 +88,14 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="category">
|
<label class="form-label" for="category">
|
||||||
<?= lang('category') ?>
|
<?= lang('category') ?>
|
||||||
</label>
|
</label>
|
||||||
<select id="category" class="form-control" disabled></select>
|
<select id="category" class="form-control" disabled></select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="availabilities-type">
|
<label class="form-label" for="availabilities-type">
|
||||||
<?= lang('availabilities_type') ?>
|
<?= lang('availabilities_type') ?>
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
|
@ -117,21 +118,33 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="location">
|
<label class="form-label" for="location">
|
||||||
<?= lang('location') ?>
|
<?= lang('location') ?>
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<input id="location" class="form-control" disabled>
|
<input id="location" class="form-control" disabled>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<?php component('color_selection', ['attributes' => 'id="color"']) ?>
|
<?php component('color_selection', ['attributes' => 'id="color"']) ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
|
<label class="form-label" for="description">
|
||||||
|
<?= lang('description') ?>
|
||||||
|
</label>
|
||||||
|
<textarea id="description" rows="4" class="form-control" disabled></textarea>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="border rounded mb-3 p-3">
|
||||||
|
<label class="form-label mb-3">
|
||||||
|
<?= lang('options') ?>
|
||||||
|
</label>
|
||||||
|
|
||||||
<div class="form-check form-switch">
|
<div class="form-check form-switch">
|
||||||
<input class="form-check-input" type="checkbox" id="private">
|
<input class="form-check-input" type="checkbox" id="is-private">
|
||||||
<label class="form-check-label" for="private">
|
|
||||||
|
<label class="form-check-label" for="is-private">
|
||||||
<?= lang('private') ?>
|
<?= lang('private') ?>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
@ -142,13 +155,6 @@
|
||||||
</small>
|
</small>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
|
||||||
<label class="form-label" for="description">
|
|
||||||
<?= lang('description') ?>
|
|
||||||
</label>
|
|
||||||
<textarea id="description" rows="4" class="form-control" disabled></textarea>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -24,7 +24,7 @@ App.Pages.Services = (function () {
|
||||||
const $category = $('#category');
|
const $category = $('#category');
|
||||||
const $availabilitiesType = $('#availabilities-type');
|
const $availabilitiesType = $('#availabilities-type');
|
||||||
const $attendantsNumber = $('#attendants-number');
|
const $attendantsNumber = $('#attendants-number');
|
||||||
const $private = $('#private');
|
const $isPrivate = $('#is-private');
|
||||||
const $location = $('#location');
|
const $location = $('#location');
|
||||||
const $description = $('#description');
|
const $description = $('#description');
|
||||||
const $filterServices = $('#filter-services');
|
const $filterServices = $('#filter-services');
|
||||||
|
@ -140,7 +140,7 @@ App.Pages.Services = (function () {
|
||||||
color: App.Components.ColorSelection.getColor($color),
|
color: App.Components.ColorSelection.getColor($color),
|
||||||
availabilities_type: $availabilitiesType.val(),
|
availabilities_type: $availabilitiesType.val(),
|
||||||
attendants_number: $attendantsNumber.val(),
|
attendants_number: $attendantsNumber.val(),
|
||||||
is_private: Number($private.prop('checked')),
|
is_private: Number($isPrivate.prop('checked')),
|
||||||
id_categories: $category.val() || null
|
id_categories: $category.val() || null
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -295,7 +295,7 @@ App.Pages.Services = (function () {
|
||||||
$location.val(service.location);
|
$location.val(service.location);
|
||||||
$availabilitiesType.val(service.availabilities_type);
|
$availabilitiesType.val(service.availabilities_type);
|
||||||
$attendantsNumber.val(service.attendants_number);
|
$attendantsNumber.val(service.attendants_number);
|
||||||
$private.prop('checked', service.is_private);
|
$isPrivate.prop('checked', service.is_private);
|
||||||
App.Components.ColorSelection.setColor($color, service.color);
|
App.Components.ColorSelection.setColor($color, service.color);
|
||||||
|
|
||||||
const categoryId = service.id_categories !== null ? service.id_categories : '';
|
const categoryId = service.id_categories !== null ? service.id_categories : '';
|
||||||
|
@ -303,7 +303,7 @@ App.Pages.Services = (function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filters service records depending a string keyword.
|
* Filters service records depending on a string keyword.
|
||||||
*
|
*
|
||||||
* @param {String} keyword This is used to filter the service records of the database.
|
* @param {String} keyword This is used to filter the service records of the database.
|
||||||
* @param {Number} selectId Optional, if set then after the filter operation the record with this
|
* @param {Number} selectId Optional, if set then after the filter operation the record with this
|
||||||
|
@ -339,6 +339,7 @@ App.Pages.Services = (function () {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selectId) {
|
if (selectId) {
|
||||||
|
debugger
|
||||||
select(selectId, show);
|
select(selectId, show);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue