forked from mirrors/easyappointments
Remove prefix from service HTML elements
This commit is contained in:
parent
7b2315c371
commit
b7d9efe7c3
2 changed files with 32 additions and 34 deletions
|
@ -53,53 +53,53 @@
|
||||||
|
|
||||||
<div class="form-message alert" style="display:none;"></div>
|
<div class="form-message alert" style="display:none;"></div>
|
||||||
|
|
||||||
<input type="hidden" id="service-id">
|
<input type="hidden" id="id">
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="service-name">
|
<label class="form-label" for="name">
|
||||||
<?= lang('name') ?>
|
<?= lang('name') ?>
|
||||||
<span class="text-danger">*</span>
|
<span class="text-danger">*</span>
|
||||||
</label>
|
</label>
|
||||||
<input id="service-name" class="form-control required" maxlength="128">
|
<input id="name" class="form-control required" maxlength="128">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="service-duration">
|
<label class="form-label" for="duration">
|
||||||
<?= lang('duration_minutes') ?>
|
<?= lang('duration_minutes') ?>
|
||||||
<span class="text-danger">*</span>
|
<span class="text-danger">*</span>
|
||||||
</label>
|
</label>
|
||||||
<input id="service-duration" class="form-control required" type="number" min="<?= EVENT_MINIMUM_DURATION ?>">
|
<input id="duration" class="form-control required" type="number" min="<?= EVENT_MINIMUM_DURATION ?>">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="service-price">
|
<label class="form-label" for="price">
|
||||||
<?= lang('price') ?>
|
<?= lang('price') ?>
|
||||||
<span class="text-danger">*</span>
|
<span class="text-danger">*</span>
|
||||||
</label>
|
</label>
|
||||||
<input id="service-price" class="form-control required">
|
<input id="price" class="form-control required">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="service-currency">
|
<label class="form-label" for="currency">
|
||||||
<?= lang('currency') ?>
|
<?= lang('currency') ?>
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<input id="service-currency" class="form-control" maxlength="32">
|
<input id="currency" class="form-control" maxlength="32">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="service-category">
|
<label class="form-label" for="category">
|
||||||
<?= lang('category') ?>
|
<?= lang('category') ?>
|
||||||
</label>
|
</label>
|
||||||
<select id="service-category" class="form-control"></select>
|
<select id="category" class="form-control"></select>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="service-availabilities-type">
|
<label class="form-label" for="availabilities-type">
|
||||||
<?= lang('availabilities_type') ?>
|
<?= lang('availabilities_type') ?>
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<select id="service-availabilities-type" class="form-control">
|
<select id="availabilities-type" class="form-control">
|
||||||
<option value="<?= AVAILABILITIES_TYPE_FLEXIBLE ?>">
|
<option value="<?= AVAILABILITIES_TYPE_FLEXIBLE ?>">
|
||||||
<?= lang('flexible') ?>
|
<?= lang('flexible') ?>
|
||||||
</option>
|
</option>
|
||||||
|
@ -110,26 +110,26 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="service-attendants-number">
|
<label class="form-label" for="attendants-number">
|
||||||
<?= lang('attendants_number') ?>
|
<?= lang('attendants_number') ?>
|
||||||
<span class="text-danger">*</span>
|
<span class="text-danger">*</span>
|
||||||
</label>
|
</label>
|
||||||
<input id="service-attendants-number" class="form-control required" type="number" min="1">
|
<input id="attendants-number" class="form-control required" type="number" min="1">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="service-location">
|
<label class="form-label" for="location">
|
||||||
<?= lang('location') ?>
|
<?= lang('location') ?>
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<input id="service-location" class="form-control">
|
<input id="location" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="service-description">
|
<label class="form-label" for="description">
|
||||||
<?= lang('description') ?>
|
<?= lang('description') ?>
|
||||||
</label>
|
</label>
|
||||||
<textarea id="service-description" rows="4" class="form-control"></textarea>
|
<textarea id="description" rows="4" class="form-control"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -16,16 +16,16 @@
|
||||||
*/
|
*/
|
||||||
App.Pages.Services = (function () {
|
App.Pages.Services = (function () {
|
||||||
const $services = $('#services');
|
const $services = $('#services');
|
||||||
const $id = $('#service-id');
|
const $id = $('#id');
|
||||||
const $name = $('#service-name');
|
const $name = $('#name');
|
||||||
const $duration = $('#service-duration');
|
const $duration = $('#duration');
|
||||||
const $price = $('#service-price');
|
const $price = $('#price');
|
||||||
const $currency = $('#service-currency');
|
const $currency = $('#currency');
|
||||||
const $category = $('#service-category');
|
const $category = $('#category');
|
||||||
const $availabilitiesType = $('#service-availabilities-type');
|
const $availabilitiesType = $('#availabilities-type');
|
||||||
const $attendantsNumber = $('#service-attendants-number');
|
const $attendantsNumber = $('#attendants-number');
|
||||||
const $location = $('#service-location');
|
const $location = $('#location');
|
||||||
const $description = $('#service-description');
|
const $description = $('#description');
|
||||||
const $filterServices = $('#filter-services');
|
const $filterServices = $('#filter-services');
|
||||||
let filterResults = {};
|
let filterResults = {};
|
||||||
let filterLimit = 20;
|
let filterLimit = 20;
|
||||||
|
@ -385,15 +385,13 @@ App.Pages.Services = (function () {
|
||||||
*/
|
*/
|
||||||
function updateAvailableCategories() {
|
function updateAvailableCategories() {
|
||||||
App.Http.Categories.search('', 999).then((response) => {
|
App.Http.Categories.search('', 999).then((response) => {
|
||||||
var $select = $('#service-category');
|
$category.empty();
|
||||||
|
|
||||||
$select.empty();
|
|
||||||
|
|
||||||
response.forEach((category) => {
|
response.forEach((category) => {
|
||||||
$select.append(new Option(category.name, category.id));
|
$category.append(new Option(category.name, category.id));
|
||||||
});
|
});
|
||||||
|
|
||||||
$select.append(new Option('- ' + lang('no_category') + ' -', '')).val('');
|
$category.append(new Option('- ' + lang('no_category') + ' -', '')).val('');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue