mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-26 00:23:33 +03:00
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>
|
||||
|
||||
<input type="hidden" id="category-id">
|
||||
<input type="hidden" id="id">
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="category-name">
|
||||
<label class="form-label" for="name">
|
||||
<?= lang('name') ?>
|
||||
<span class="text-danger">*</span>
|
||||
</label>
|
||||
<input id="category-name" class="form-control required">
|
||||
<input id="name" class="form-control required">
|
||||
</div>
|
||||
|
||||
<div class="mb-3">
|
||||
<label class="form-label" for="category-description">
|
||||
<label class="form-label" for="description">
|
||||
<?= lang('description') ?>
|
||||
|
||||
</label>
|
||||
<textarea id="category-description" rows="4" class="form-control"></textarea>
|
||||
<textarea id="description" rows="4" class="form-control"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -17,9 +17,9 @@
|
|||
App.Pages.Categories = (function () {
|
||||
const $categories = $('#categories');
|
||||
const $filterCategories = $('#filter-categories');
|
||||
const $id = $('#category-id');
|
||||
const $name = $('#category-name');
|
||||
const $description = $('#category-description');
|
||||
const $id = $('#id');
|
||||
const $name = $('#name');
|
||||
const $description = $('#description');
|
||||
let filterResults = {};
|
||||
let filterLimit = 20;
|
||||
|
||||
|
@ -53,13 +53,13 @@ App.Pages.Categories = (function () {
|
|||
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));
|
||||
|
||||
display(category);
|
||||
$('#filter-categories .selected').removeClass('selected');
|
||||
$(event.target).addClass('selected');
|
||||
$(event.currentTarget).addClass('selected');
|
||||
$('#edit-category, #delete-category').prop('disabled', false);
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue