Commit ad42cf34 authored by Gabriel Monnerat's avatar Gabriel Monnerat

erp5_web_renderjs_ui: propagate parameter to enable graphic

parent c8120676
...@@ -34,7 +34,8 @@ ...@@ -34,7 +34,8 @@
extended_search: (is_first_bottom_listbox && (form_definition.extended_search)), // searchfield specific extended_search: (is_first_bottom_listbox && (form_definition.extended_search)), // searchfield specific
field_type: rendered_document[field_name].type, field_type: rendered_document[field_name].type,
label: ((group_name !== "bottom") && (rendered_document[field_name].title.length > 0)), // no label for bottom group and field without title label: ((group_name !== "bottom") && (rendered_document[field_name].title.length > 0)), // no label for bottom group and field without title
field_json: rendered_document[field_name] // pass field_json: rendered_document[field_name], // pass
enable_graphic: modification_dict.enable_graphic
}; };
// XXX: what is the purpose of this? // XXX: what is the purpose of this?
...@@ -190,6 +191,7 @@ ...@@ -190,6 +191,7 @@
return this.changeState({ return this.changeState({
erp5_document: options.erp5_document, erp5_document: options.erp5_document,
form_definition: options.form_definition, form_definition: options.form_definition,
enable_graphic: options.enable_graphic,
jio_key: options.jio_key, jio_key: options.jio_key,
hash: hash, hash: hash,
view: options.view, view: options.view,
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>991.26405.47.57924</string> </value> <value> <string>997.28933.33599.15445</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1618519262.64</float> <float>1641917242.86</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -581,6 +581,7 @@ ...@@ -581,6 +581,7 @@
show_clipboard_action: false, show_clipboard_action: false,
// graphic // graphic
enable_graphic: options.enable_graphic,
graphic_type: graphic_type graphic_type: graphic_type
}); });
}); });
...@@ -1196,7 +1197,7 @@ ...@@ -1196,7 +1197,7 @@
}) })
); );
} }
if (!gadget.state.extended_search) { if (!gadget.state.extended_search && gadget.state.enable_graphic) {
domsugar(gadget.element.querySelector(".graphic_section"), [ domsugar(gadget.element.querySelector(".graphic_section"), [
domsugar("select", { domsugar("select", {
"name": "GraphicSelect", "name": "GraphicSelect",
...@@ -1208,6 +1209,7 @@ ...@@ -1208,6 +1209,7 @@
}); });
}); });
if (!gadget.state.extended_search && if (!gadget.state.extended_search &&
gadget.state.enable_graphic &&
gadget.state.graphic_type && gadget.state.graphic_type &&
gadget.state.graphic_type !== "") { gadget.state.graphic_type !== "") {
result_queue result_queue
......
...@@ -240,7 +240,7 @@ ...@@ -240,7 +240,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>997.21666.38260.2918</string> </value> <value> <string>997.28008.46664.51182</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -258,7 +258,7 @@ ...@@ -258,7 +258,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1641490303.25</float> <float>1641918364.42</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
if (form_gadget.state.extended_search) { if (form_gadget.state.extended_search) {
form_options.form_definition.extended_search = form_gadget.state.extended_search; form_options.form_definition.extended_search = form_gadget.state.extended_search;
} }
form_options.enable_graphic = true;
return erp5_form.render(form_options); return erp5_form.render(form_options);
}) })
......
...@@ -234,7 +234,7 @@ ...@@ -234,7 +234,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>979.58033.54588.53418</string> </value> <value> <string>997.28531.29725.31266</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1574153832.0</float> <float>1641893404.13</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </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