fix typo in forms.sh

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2023-04-24 23:32:30 +02:00
parent 3bff5f2851
commit 9728a84e75

View file

@ -31,7 +31,7 @@
}
}
function disableSpinnerSpinner() {
function enableSpinner() {
document.getElementById('overlay').classList.add('loading');
}
@ -51,7 +51,7 @@
xhr.addEventListener('error', () => disableSpinner());
xhr.open(form.method, form.getAttribute("action"));
xhr.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');
disableSpinnerSpinner();
enableSpinner();
xhr.send(new URLSearchParams(new FormData(form)));
event.preventDefault();
}