Commit 08a7d369 authored by Vincent Pelletier's avatar Vincent Pelletier

Fix erp5.js modifying the focus on login form after login_form.js did.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@11939 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d19561ee
...@@ -67,17 +67,18 @@ function submitAction(form,act) {\n ...@@ -67,17 +67,18 @@ function submitAction(form,act) {\n
}\n }\n
\n \n
// The first input element with an "autofocus" class will get the focus,\n // The first input element with an "autofocus" class will get the focus,\n
// else, the first input is chosen.\n // else, nothing done\n
// XXX - this requires to be fixed\n
function autoFocus() {\n function autoFocus() {\n
var inputs = document.getElementsByTagName("input");\n var inputs = document.getElementsByTagName("input");\n
var input_to_focus = inputs[0];\n var input_to_focus = 0;\n
for (i=0;i<inputs.length;i++) {\n for (i=0;i<inputs.length;i++) {\n
if (inputs[i].className == "autofocus") {\n if (inputs[i].className == "autofocus") {\n
input_to_focus = inputs[i];\n input_to_focus = inputs[i];\n
}\n }\n
}\n }\n
if (input_to_focus != 0) {\n
input_to_focus.focus();\n input_to_focus.focus();\n
}\n
}\n }\n
\n \n
function fixLeftRightHeight(){\n function fixLeftRightHeight(){\n
......
310 314
\ No newline at end of file \ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment