Merge pull request #405 from syrk4web/dev

remove prefix multiple input
This commit is contained in:
Théophile Diot 2023-01-12 16:55:11 +01:00 committed by GitHub
commit 50b83790a5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 18 additions and 0 deletions

View File

@ -378,6 +378,24 @@ class Multiple {
.getAttribute("setting-container")
.replace("SCHEMA", `${setNum}`);
ctnr.setAttribute("setting-container", newName);
//rename input
try {
const inp = ctnr.querySelector("input");
const newInpName = inp
.getAttribute("name")
.replace("_SCHEMA", "");
inp.setAttribute("name", newInpName);
inp.setAttribute("id", newInpName);
} catch (err) {}
//rename select
try {
const select = ctnr.querySelector("select");
const newInpName = select
.getAttribute("name")
.replace("_SCHEMA", "");
select.setAttribute("name", newInpName);
select.setAttribute("id", newInpName);
} catch (err) {}
});
} catch (err) {}