X-Git-Url: https://dev.renevier.net/?a=blobdiff_plain;f=public%2Fjs%2Flogin.js;h=25562ed14b3382a02c9a6653a62213acaa068dbe;hb=1f6105289a49079809c2a4677b561bc82c62db88;hp=44d8e080734c868b8a02137aed5658e94f105ed3;hpb=190fd621df4920c56a422c03663874cddaa67d64;p=syj.git diff --git a/public/js/login.js b/public/js/login.js index 44d8e08..25562ed 100644 --- a/public/js/login.js +++ b/public/js/login.js @@ -1,14 +1,16 @@ -/* This file is part of Syj, Copyright (c) 2010 Arnaud Renevier, +/* This file is part of Syj, Copyright (c) 2010-2011 Arnaud Renevier, and is published under the AGPL license. */ document.observe("dom:loaded", function() { var form = $("loginform"); - form.focus(); + form.setfocus(); form.observe("submit", function(evt) { + var loginput = $("login_user"); $$('.error').invoke('remove'); - if (!$("login_user").check(function() { return !this.value.strip().empty(); }, SyjStrings.userEmptyWarn)) { + if (!loginput.check(function() { return !this.value.strip().empty(); }, SyjStrings.userEmptyWarn)) { + loginput.highlight('#F08080').activate(); evt.stop(); return; }