From: Andrew Dolgov Date: Mon, 20 Aug 2007 05:10:03 +0000 (+0100) Subject: login form: validate fields X-Git-Tag: 1.2.14~22 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=ec6b7adab6e387dfa201ef0b481a4e33b49821e4;p=tt-rss.git login form: validate fields --- diff --git a/login_form.php b/login_form.php index 9555f56f..a8f6de74 100644 --- a/login_form.php +++ b/login_form.php @@ -7,6 +7,8 @@ + + @@ -34,6 +36,26 @@ function languageChange(elem) { exception_error("languageChange", e); } } + +function validateLoginForm(f) { + try { + + if (f.login.value.length == 0) { + new Effect.Highlight(f.login); + return false; + } + + if (f.password.value.length == 0) { + new Effect.Highlight(f.password); + return false; + } + + return true; + } catch (e) { + exception_error("validateLoginForm", e); + return true; + } +} -
+