Commit 121738dabf0a0a55cfec39764814611655d2b3b9
1 parent
38130770
added explicit login name field focus
git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@1935 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
22 additions
and
1 deletions
presentation/login.php
| ... | ... | @@ -28,6 +28,27 @@ if ($loginAction == "loginForm") { |
| 28 | 28 | <link rel=\"stylesheet\" href=\"$default->uiUrl/stylesheet.php\"> |
| 29 | 29 | <link rel=\"SHORTCUT ICON\" href=\"$default->graphicsUrl/tree.ico\"> |
| 30 | 30 | <title>The KnowledgeTree</title> |
| 31 | + | |
| 32 | + <SCRIPT TYPE=\"text/javascript\"> | |
| 33 | + <!-- | |
| 34 | + function submitenter(myfield,e) | |
| 35 | + { | |
| 36 | + var keycode; | |
| 37 | + if (window.event) keycode = window.event.keyCode; | |
| 38 | + else if (e) keycode = e.which; | |
| 39 | + else return true; | |
| 40 | + | |
| 41 | + if (keycode == 13) | |
| 42 | + { | |
| 43 | + myfield.form.submit(); | |
| 44 | + return false; | |
| 45 | + } | |
| 46 | + else | |
| 47 | + return true; | |
| 48 | + } | |
| 49 | + //--> | |
| 50 | + </SCRIPT | |
| 51 | + | |
| 31 | 52 | </head> |
| 32 | 53 | <body onload=\"javascript:document.loginForm.fUserName.focus()\"> |
| 33 | 54 | <center> |
| ... | ... | @@ -41,7 +62,7 @@ if ($loginAction == "loginForm") { |
| 41 | 62 | \t<tr><td>$lang_username:</td></tr> |
| 42 | 63 | \t<tr><td><input type=\"text\" name=\"fUserName\" size=\"35\"></td></tr> |
| 43 | 64 | \t<tr><td>$lang_password:</td></tr> |
| 44 | - <tr><td><input type=\"password\" name=\"fPassword\" size=\"35\"> | |
| 65 | + <tr><td><input type=\"password\" name=\"fPassword\" size=\"35\" onKeyPress=\"return submitenter(this,event)\"> | |
| 45 | 66 | </td></tr> |
| 46 | 67 | <input type=\"hidden\" name=\"redirect\" value=\"$redirect\"/> |
| 47 | 68 | <input type=\"hidden\" name=\"loginAction\" value=\"login\">\n | ... | ... |