Commit affec7de authored by Roque's avatar Roque

erp5_officejs: submit handled by form view instead of controller

parent 86591014
......@@ -137,10 +137,7 @@
var argument_list = arguments;
return this.getDeclaredGadget('form_view')
.push(function (view_gadget) {
return view_gadget.getDeclaredGadget('fg');
})
.push(function (gadget) {
return gadget.triggerSubmit.apply(gadget, argument_list);
return view_gadget.triggerSubmit(argument_list);
});
});
......
......@@ -225,7 +225,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>975.60837.8816.16179</string> </value>
<value> <string>975.61034.6128.3037</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -243,7 +243,7 @@
</tuple>
<state>
<tuple>
<float>1558706589.95</float>
<float>1558718052.37</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -95,6 +95,13 @@
return form_json;
})
.declareMethod("triggerSubmit", function (argument_list) {
return this.getDeclaredGadget('fg')
.push(function (gadget) {
return gadget.triggerSubmit(argument_list);
});
})
.declareMethod("render", function (options) {
var fragment = document.createElement('div'),
gadget = this,
......@@ -115,7 +122,8 @@
.declareMethod("renderSubGadget", function (options, subgadget, form_json) {
var this_gadget = this, erp5_document = form_json.erp5_document,
page_title = options.portal_type, add_url;
page_title = options.portal_type,
add_url = false;
return subgadget.render({
jio_key: options.jio_key,
doc: options.doc,
......
......@@ -269,7 +269,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>975.46515.39016.26350</string> </value>
<value> <string>975.61035.13847.33843</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -287,7 +287,7 @@
</tuple>
<state>
<tuple>
<float>1557927355.84</float>
<float>1558718116.94</float>
<string>UTC</string>
</tuple>
</state>
......
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