From a7ffbc92506d25ae81856b29238fefe5f2b88b83 Mon Sep 17 00:00:00 2001
From: Romain Courteaud <romain@nexedi.com>
Date: Mon, 6 Feb 2017 12:13:05 +0000
Subject: [PATCH] [erp5_xhtml_style] Support some methods used in ERP5JS

---
 .../erp5_xhtml_style/erp5_gadgetfield.js.js     | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5_gadgetfield.js.js b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5_gadgetfield.js.js
index 99a6367b97..90f67973c8 100644
--- a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5_gadgetfield.js.js
+++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/erp5_gadgetfield.js.js
@@ -69,6 +69,23 @@
         return displayFieldError(argument_list[0]);
       })
 
+    /////////////////////////////////////////////////////////////////
+    // Support some methods used in ERP5JS
+    /////////////////////////////////////////////////////////////////
+    .allowPublicAcquisition('notifyChange',
+                            function () {
+        return;
+      })
+
+    .allowPublicAcquisition('notifyValid',
+                            function () {
+        return;
+      })
+
+    .allowPublicAcquisition('notifySubmit', function () {
+      return this.element.querySelector('form').querySelector('[type="submit"]').click();
+    })
+
     /////////////////////////////////////////////////////////////////
     // declared methods
     /////////////////////////////////////////////////////////////////
-- 
2.30.9