Shake head on login failures.
This commit is contained in:
1 parent
b1163a5102
commit
b200d45253
2 files changed
+57
-8
No files matched your search
@@ -466,6 +466,8 @@ GuacamoleRootUI.sections.login_form.onsubmit = function() {
|
||||
|
||||
try {
|
||||
|
||||
GuacUI.removeClass(GuacamoleRootUI.views.login, "error");
|
||||
|
||||
// Attempt login
|
||||
GuacamoleRootUI.login(
|
||||
GuacamoleRootUI.fields.username.value,
|
||||
@@ -482,12 +484,17 @@ GuacamoleRootUI.sections.login_form.onsubmit = function() {
|
||||
}
|
||||
catch (e) {
|
||||
|
||||
// Display error, reset and refocus password field
|
||||
GuacamoleRootUI.messages.login_error.textContent = e.message;
|
||||
window.setTimeout(function() {
|
||||
|
||||
// Reset and recofus password field
|
||||
GuacamoleRootUI.fields.password.value = "";
|
||||
GuacamoleRootUI.fields.password.focus();
|
||||
// Display error
|
||||
GuacUI.addClass(GuacamoleRootUI.views.login, "error");
|
||||
GuacamoleRootUI.messages.login_error.textContent = e.message;
|
||||
|
||||
// Reset and refocus password field
|
||||
GuacamoleRootUI.fields.password.value = "";
|
||||
GuacamoleRootUI.fields.password.focus();
|
||||
|
||||
}, 1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user