]> dev.renevier.net Git - syj.git/blob - public/js/login.js
version 0.1
[syj.git] / public / js / login.js
1 /*  This file is part of Syj, Copyright (c) 2010 Arnaud Renevier,
2     and is published under the AGPL license. */
3
4 document.observe("dom:loaded", function() {
5     var form = $("loginform");
6     form.focus();
7
8     form.observe("submit", function(evt) {
9         $$('.error').invoke('remove');
10
11         if (!$("login_user").check(function() { return !this.value.strip().empty(); }, SyjStrings.userEmptyWarn)) {
12             evt.stop();
13             return;
14         }
15     });
16 });