MAPG-149 omit focusing/selecting input elements after processing

This commit is contained in:
Bence Pőcze 2020-06-18 16:28:01 +02:00
parent 1be51b3e07
commit 64b6197bd4
3 changed files with 0 additions and 8 deletions

View File

@ -29,8 +29,6 @@
loginFormError.style.display = 'block'; loginFormError.style.display = 'block';
loginFormError.innerHTML = errorText; loginFormError.innerHTML = errorText;
form.elements.email.select();
return; return;
} }

View File

@ -37,15 +37,12 @@
profileFormError.style.display = 'block'; profileFormError.style.display = 'block';
profileFormError.innerHTML = errorText; profileFormError.innerHTML = errorText;
form.elements.password_new.select();
return; return;
} }
document.getElementById('profileFormError').style.display = 'none'; document.getElementById('profileFormError').style.display = 'none';
form.reset(); form.reset();
form.elements.save.disabled = true; form.elements.save.disabled = true;
form.elements.password_new.focus();
}, formData); }, formData);
}; };
})(); })();

View File

@ -35,14 +35,11 @@
signupFormError.style.display = 'block'; signupFormError.style.display = 'block';
signupFormError.innerHTML = errorText; signupFormError.innerHTML = errorText;
form.elements.email.select();
return; return;
} }
document.getElementById('signupFormError').style.display = 'none'; document.getElementById('signupFormError').style.display = 'none';
form.reset(); form.reset();
form.elements.email.focus();
MapGuesser.showModalWithContent('Sign up successful', 'Sign up was successful. Please check your email and click on the activation link to activate your account!'); MapGuesser.showModalWithContent('Sign up successful', 'Sign up was successful. Please check your email and click on the activation link to activate your account!');
}, formData); }, formData);