From 115fe6802e3ab0b6e115f56e87a21fb2b6db57c8 Mon Sep 17 00:00:00 2001 From: Ivan Tyagov <ivan@nexedi.com> Date: Tue, 18 Jan 2011 14:47:17 +0000 Subject: [PATCH] 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 --- .../erp5_xhtml_jquery_style/erp5.js.xml | 16 +++------------- bt5/erp5_xhtml_jquery_style/bt/revision | 2 +- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/erp5.js.xml b/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/erp5.js.xml index f545643b0b..0d4a6e919c 100644 --- a/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/erp5.js.xml +++ b/bt5/erp5_xhtml_jquery_style/SkinTemplateItem/portal_skins/erp5_xhtml_jquery_style/erp5.js.xml @@ -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 diff --git a/bt5/erp5_xhtml_jquery_style/bt/revision b/bt5/erp5_xhtml_jquery_style/bt/revision index 301160a930..f11c82a4cb 100644 --- a/bt5/erp5_xhtml_jquery_style/bt/revision +++ b/bt5/erp5_xhtml_jquery_style/bt/revision @@ -1 +1 @@ -8 \ No newline at end of file +9 \ No newline at end of file -- 2.30.9