forked from mirrors/easyappointments
Remove prefix from category HTML elements
This commit is contained in:
parent
b7d9efe7c3
commit
cf1fe8d537
2 changed files with 10 additions and 10 deletions
|
@ -54,22 +54,22 @@
|
||||||
|
|
||||||
<div class="form-message alert" style="display:none;"></div>
|
<div class="form-message alert" style="display:none;"></div>
|
||||||
|
|
||||||
<input type="hidden" id="category-id">
|
<input type="hidden" id="id">
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="category-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="category-name" class="form-control required">
|
<input id="name" class="form-control required">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<label class="form-label" for="category-description">
|
<label class="form-label" for="description">
|
||||||
<?= lang('description') ?>
|
<?= lang('description') ?>
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<textarea id="category-description" rows="4" class="form-control"></textarea>
|
<textarea id="description" rows="4" class="form-control"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
App.Pages.Categories = (function () {
|
App.Pages.Categories = (function () {
|
||||||
const $categories = $('#categories');
|
const $categories = $('#categories');
|
||||||
const $filterCategories = $('#filter-categories');
|
const $filterCategories = $('#filter-categories');
|
||||||
const $id = $('#category-id');
|
const $id = $('#id');
|
||||||
const $name = $('#category-name');
|
const $name = $('#name');
|
||||||
const $description = $('#category-description');
|
const $description = $('#description');
|
||||||
let filterResults = {};
|
let filterResults = {};
|
||||||
let filterLimit = 20;
|
let filterLimit = 20;
|
||||||
|
|
||||||
|
@ -53,13 +53,13 @@ App.Pages.Categories = (function () {
|
||||||
return; // exit because we are on edit mode
|
return; // exit because we are on edit mode
|
||||||
}
|
}
|
||||||
|
|
||||||
const categoryId = $(event.target).attr('data-id');
|
const categoryId = $(event.currentTarget).attr('data-id');
|
||||||
|
|
||||||
const category = filterResults.find((filterResult) => Number(filterResult.id) === Number(categoryId));
|
const category = filterResults.find((filterResult) => Number(filterResult.id) === Number(categoryId));
|
||||||
|
|
||||||
display(category);
|
display(category);
|
||||||
$('#filter-categories .selected').removeClass('selected');
|
$('#filter-categories .selected').removeClass('selected');
|
||||||
$(event.target).addClass('selected');
|
$(event.currentTarget).addClass('selected');
|
||||||
$('#edit-category, #delete-category').prop('disabled', false);
|
$('#edit-category, #delete-category').prop('disabled', false);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue