[Erp5-report] r36714 ivan - in /erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style: SkinTe...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Jun 30 10:32:23 CEST 2010


Author: ivan
Date: Wed Jun 30 10:32:23 2010
New Revision: 36714

URL: http://svn.erp5.org?rev=36714&view=rev
Log:
Disable other form elements having same html tag and name attribut if elemet explicitly passed.
This way is some rare cases where in one form ERP5 page multiple such elements exists we can still send form with correct data.

Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml?rev=36714&r1=36713&r2=36714&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5.js.xml [utf8] Wed Jun 30 10:32:23 2010
@@ -174,7 +174,7 @@ function fixLeftRightHeightAndFocus(fix_
 // and modify respective main form action\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){\n
+function submitFormOnEnter(event, form, method_name, clear_changed_flag, element){\n
   if (clear_changed_flag == null){\n
     clear_changed_flag = false;\n
   }\n
@@ -186,6 +186,12 @@ function submitFormOnEnter(event, form, 
     if (clear_changed_flag==true) {\n
       changed = false;\n
     }\n
+    if(element!=null){\n
+      // disable other form elements having same name attribute\n
+      forEach(getElementsByTagAndClassName(element.tagName), function (input){\n
+        if((input.name == element.name) && (input!=element)){input.disabled = true;}\n
+      });\n
+     }\n
     form.submit();\n
   }\n
 }\n

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision?rev=36714&r1=36713&r2=36714&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_xhtml_style/bt/revision [utf8] Wed Jun 30 10:32:23 2010
@@ -1 +1 @@
-955
\ No newline at end of file
+957
\ No newline at end of file




More information about the Erp5-report mailing list