Commit 115fe680 authored by Ivan Tyagov's avatar Ivan Tyagov

Do not disable other form elements having same name attribute.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42416 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 251c964d
......@@ -171,25 +171,15 @@ function fixLeftRightHeightAndFocus(fix_height) {\n
// if clear_changed_flag is set to true, changed will be set to false, so no\n
// warning message about unsaved changes will be displayed\n
function submitFormOnEnter(event, form, method_name, clear_changed_flag, element){\n
if (clear_changed_flag == null){\n
clear_changed_flag = false;\n
}\n
if (clear_changed_flag == null){ clear_changed_flag = false; }\n
if(event.keyCode == 13){\n
if (form == \'main_form\') {\n
if (form == "main_form") {\n
form = $("#"+form); // backward compatibility\n
}\n
form.action = method_name;\n
form.attr("action", method_name);\n
if (clear_changed_flag==true) {\n
changed = false;\n
}\n
if(element!=null){\n
// disable other form elements having same name attribute\n
$(element.tagName).each(\n
function (index){\n
input = $(this);\n
if((input.attr("name") == element.name) && (input!=element)){input.attr("disabled",true);}\n
});\n
}\n
form.submit();\n
}\n
}\n
......
8
\ No newline at end of file
9
\ 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