Unified Category modal
This commit is contained in:
@ -31,6 +31,20 @@ function getDataForEdit(name) {
|
||||
});
|
||||
}
|
||||
|
||||
function primeCreateNew() {
|
||||
const form = document.getElementById('CategoryModalForm');
|
||||
form.setAttribute('method', 'POST');
|
||||
document.getElementById('editCategoryModalLabel').innerText = 'Create a new category';
|
||||
return true;
|
||||
}
|
||||
|
||||
function primeEdit() {
|
||||
const form = document.getElementById('CategoryModalForm');
|
||||
document.getElementById('editCategoryModalLabel').innerText = 'Edit category';
|
||||
form.setAttribute('method', 'PATCH');
|
||||
return true;
|
||||
}
|
||||
|
||||
function deleteEntry(id) {
|
||||
$.ajax({
|
||||
type: 'delete',
|
||||
|
Reference in New Issue
Block a user