Commit 34bc91ca authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Render subform for an object rather them hidden value on restrict mode

The recursive call makes the tree be rendered as hidden inputs respecting all the values
parent 05ab647c
...@@ -301,7 +301,16 @@ ...@@ -301,7 +301,16 @@
if (default_used_list.indexOf(key) < 0) { if (default_used_list.indexOf(key) < 0) {
div = document.createElement("div"); div = document.createElement("div");
div.title = key; div.title = key;
if (restricted === true) { if (typeof default_dict[key] === 'object') {
div_input = document.createElement("div");
div_input.setAttribute("class", "input");
label.setAttribute("class", "slapos-parameter-dict-key");
div_input = render_subform({},
default_dict[key],
div_input,
path + "/" + key,
restricted);
} else if (restricted === true) {
div_input = document.createElement("div"); div_input = document.createElement("div");
div_input.setAttribute("class", "input"); div_input.setAttribute("class", "input");
input = render_field({"type": "hidden"}, default_dict[key]); input = render_field({"type": "hidden"}, default_dict[key]);
......
...@@ -242,6 +242,7 @@ ...@@ -242,6 +242,7 @@
</item> </item>
</dictionary> </dictionary>
</list> </list>
<none/>
</tuple> </tuple>
</pickle> </pickle>
</record> </record>
...@@ -274,7 +275,7 @@ ...@@ -274,7 +275,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>977.18251.8356.31675</string> </value> <value> <string>977.52369.42334.22357</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -292,7 +293,7 @@ ...@@ -292,7 +293,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1563930486.7</float> <float>1580829895.44</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
...@@ -301,6 +302,7 @@ ...@@ -301,6 +302,7 @@
</item> </item>
</dictionary> </dictionary>
</list> </list>
<none/>
</tuple> </tuple>
</pickle> </pickle>
</record> </record>
...@@ -358,6 +360,7 @@ ...@@ -358,6 +360,7 @@
</item> </item>
</dictionary> </dictionary>
</list> </list>
<none/>
</tuple> </tuple>
</pickle> </pickle>
</record> </record>
......
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