diff --git a/src/main/resources/static/js/shared/sharedUI.js b/src/main/resources/static/js/shared/sharedUI.js index ac7ee45..2bc7682 100644 --- a/src/main/resources/static/js/shared/sharedUI.js +++ b/src/main/resources/static/js/shared/sharedUI.js @@ -32,7 +32,9 @@ export function createEditForm(fields) { } -export function editElement() { +export function editElement(element, attributes) { + + for (const [attr, val] of Object.entries(attributes)) element.setAttribute(attr, val); }