12 lines
539 B
JavaScript
12 lines
539 B
JavaScript
|
function selectDataForEdit(id) {
|
||
|
const titleForm = document.getElementById('editCategoryModalName');
|
||
|
const descriptionForm = document.getElementById('editCategoryModalDescription');
|
||
|
const idForm = document.getElementById('editCategoryModalId');
|
||
|
const trData = document.getElementById('listEntry-' + id);
|
||
|
const title = trData.children[1].innerText;
|
||
|
const description = trData.children[2].innerText;
|
||
|
const idData = trData.children[0].innerText;
|
||
|
titleForm.value = title;
|
||
|
descriptionForm.value = description;
|
||
|
idForm.value = idData;
|
||
|
}
|