diff options
author | Andrew Dolgov <[email protected]> | 2010-01-26 11:28:23 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2010-01-26 11:28:23 +0300 |
commit | 5439fbd3d21b1005d11e9053455428fabe5e5e1d (patch) | |
tree | 5072ddc9f74859c8203d1e1d8495aea19184ff5b /login_form.php | |
parent | 51c78a881c8df94180c1144ab813c4fae1a8ef50 (diff) | |
parent | 4fab608e66e493bae682f0dc0e907cc40d7adaf4 (diff) |
Merge branch 'master' of bah.org.ru:public_html/testbox/tt-rss
Diffstat (limited to 'login_form.php')
-rw-r--r-- | login_form.php | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/login_form.php b/login_form.php index af5e70e9b..ad3b21854 100644 --- a/login_form.php +++ b/login_form.php @@ -14,20 +14,15 @@ <script type="text/javascript"> function init() { - if (arguments.callee.done) return; - arguments.callee.done = true; - - var login = document.forms["loginForm"].login; - var limit_set = getCookie("ttrss_bwlimit"); if (limit_set == "true") { document.forms["loginForm"].bw_limit.checked = true; } - login.focus(); - + document.forms["loginForm"].login.focus(); } + function fetchProfiles() { try { var params = Form.serialize('loginForm'); @@ -102,10 +97,9 @@ function validateLoginForm(f) { </script> <script type="text/javascript"> -if (document.addEventListener) { - document.addEventListener("DOMContentLoaded", init, null); -} -window.onload = init; + Event.observe(window, 'load', function() { + init(); + }); </script> <form action="" method="POST" id="loginForm" name="loginForm" onsubmit="return validateLoginForm(this)"> @@ -125,11 +119,11 @@ window.onload = init; <table> <tr><td align="right"><?php echo __("Login:") ?></td> <td align="right"><input name="login" - onchange="fetchProfiles()" + onchange="fetchProfiles()" onfocus="fetchProfiles()" value="<?php echo $_SERVER["REMOTE_USER"] ?>"></td></tr> <tr><td align="right"><?php echo __("Password:") ?></td> <td align="right"><input type="password" name="password" - onchange="fetchProfiles()" + onchange="fetchProfiles()" onfocus="fetchProfiles()" value="<?php echo $_SERVER["REMOTE_USER"] ?>"></td></tr> <?php if (ENABLE_TRANSLATIONS) { ?> <tr><td align="right"><?php echo __("Language:") ?></td> @@ -155,7 +149,7 @@ window.onload = init; <tr><td colspan="2" align="right" class="innerLoginCell"> - <button name='click'><?php echo __('Log in') ?></button> + <button type="submit" name='click'><?php echo __('Log in') ?></button> <?php if (defined('ENABLE_REGISTRATION') && ENABLE_REGISTRATION) { ?> <button onclick="return gotoRegForm()"> <?php echo __("Create new account") ?></button> |