neuer name wird über setAttribute gesetzt
This commit is contained in:
1 parent
d9fd91ad8d
commit
148c33cf6e
1 file changed
+2
-2
@@ -27,14 +27,14 @@ export function deleteCategory(deleteAllItems, categoryID) {
|
||||
|
||||
}
|
||||
|
||||
export function createEditCategoryForm(textElement) {
|
||||
export function createEditCategoryForm(categoryName) {
|
||||
const editForm = document.createElement("form");
|
||||
const inputName = document.createElement("input");
|
||||
const abortButton = document.createElement("button");
|
||||
const saveButton = document.createElement("button");
|
||||
|
||||
inputName.setAttribute("name", "newCategoryName");
|
||||
inputName.setAttribute("value", textElement.querySelector(".category__name").textContent);
|
||||
inputName.setAttribute("value", categoryName);
|
||||
inputName.classList.add("editForm__name");
|
||||
|
||||
abortButton.textContent = "Abbrechen";
|
||||
|
||||
Reference in new issue
Block a user