From 50feb12405b6d6fe6378480f5ed2b5fd50dc72d1 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Mon, 13 Jul 2009 21:58:44 +0000 Subject: [PATCH] Disable login button upon submit (instead of hiding it) Monotone-Parent: 05432797f1348e54ed2d395a86f69593bb3e3d90 Monotone-Revision: 7d7fda1fe8fdf96d8a846378379c8a49661b7e7b Monotone-Author: flachapelle@inverse.ca Monotone-Date: 2009-07-13T21:58:44 Monotone-Branch: ca.inverse.sogo --- UI/WebServerResources/SOGoRootPage.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/UI/WebServerResources/SOGoRootPage.js b/UI/WebServerResources/SOGoRootPage.js index 2c6f1200f..b5fae56af 100644 --- a/UI/WebServerResources/SOGoRootPage.js +++ b/UI/WebServerResources/SOGoRootPage.js @@ -31,7 +31,9 @@ function onLoginClick(event) { var language = $("language"); if (userName.length > 0) { - this.hide(); + $("loginErrorMessage").hide(); + $("noCookiesErrorMessage").hide(); + this.disabled = true; startAnimation($("animation")); if (typeof(loginSuffix) != "undefined" @@ -76,7 +78,7 @@ function onLoginCallback(http) { if (cookieExists === 0) { loginErrorMessage.hide(); noCookiesErrorMessage.show(); - submitBtn.show(); + submitBtn.disabled = false; return false; } @@ -112,7 +114,7 @@ function onLoginCallback(http) { else { loginErrorMessage.show(); noCookiesErrorMessage.hide(); - submitBtn.show(); + submitBtn.disabled = false; } } }