fix installation form behaviour if run multiple times in a single load

This commit is contained in:
Holly 2021-05-09 20:35:53 +00:00
parent f9fcf19afa
commit 24e1942cbd
1 changed files with 5 additions and 0 deletions

View File

@ -1,5 +1,10 @@
// Convert each line of the textarea to a unique input element, so they're all passed with separate GET parameters
function updateForm() {
// Delete old input elements in case the page hasn't been reloaded since last call
for (const oldInput of document.querySelectorAll('input[type="hidden"]')) {
oldInput.remove();
}
form = document.getElementById("install-form");
instances = document.getElementById("instance-input").value.split("\n");