Switch submit order

This commit is contained in:
James Musselman 2023-11-29 18:14:09 -06:00
parent 7682d9fd47
commit 53c4fb0f89

View file

@ -79,12 +79,6 @@ function submitSignup() {
submitBtn.innerHTML = '';
submitBtn.appendChild(spinner);
// Enable the button and remove the spinner after 5 seconds
setTimeout(function () {
submitBtn.disabled = false;
submitBtn.innerHTML = 'Sign Up';
}, 5000);
sleep(5000).then(() => { submitBtn.disabled = false; });
// Get the values of the signup form fields
const name = document.getElementById("name").value;
@ -117,6 +111,16 @@ function submitSignup() {
.catch(error => {
console.error(error);
});
// Enable the button and remove the spinner after 5 seconds
setTimeout(function () {
submitBtn.disabled = false;
submitBtn.innerHTML = 'Sign Up';
}, 5000);
sleep(5000).then(() => { submitBtn.disabled = false; });
}