Commit affb6f3b authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Fix rendering form for Slave/Shared cases.

parent eab0f1d4
...@@ -700,8 +700,8 @@ ...@@ -700,8 +700,8 @@
option['data-shared'] = json['software-type'][option_index].shared; option['data-shared'] = json['software-type'][option_index].shared;
if ((option_index === option_selected) && if ((option.value === option_selected) &&
(options.value.parameter.shared === json['software-type'][option_index].shared)) { (options.value.parameter.shared == json['software-type'][option_index].shared)) {
option.selected = "selected"; option.selected = "selected";
if (json['software-type'][option_index].shared === true) { if (json['software-type'][option_index].shared === true) {
parameter_shared.value = true; parameter_shared.value = true;
...@@ -712,7 +712,7 @@ ...@@ -712,7 +712,7 @@
if (restricted_softwaretype === true) { if (restricted_softwaretype === true) {
if (option.value === options.value.parameter.softwaretype) { if (option.value === options.value.parameter.softwaretype) {
if (options.value.parameter.shared === json['software-type'][option_index].shared) { if (options.value.parameter.shared == json['software-type'][option_index].shared) {
input.appendChild(option); input.appendChild(option);
} }
} }
...@@ -920,10 +920,14 @@ ...@@ -920,10 +920,14 @@
return gadget.getElement() return gadget.getElement()
.push(function (element) { .push(function (element) {
var text_content = element.querySelector('textarea[name=text_content]'), var text_content = element.querySelector('textarea[name=text_content]'),
software_type = element.querySelector('select[name=software_type]'); software_type = element.querySelector('select[name=software_type]'),
shared = element.querySelector('input[name=shared]');
if (software_type !== null) { if (software_type !== null) {
content_dict.software_type = software_type.value; content_dict.software_type = software_type.value;
} }
if ((shared !== null) && (shared.value === "true")) {
content_dict.shared = 1;
}
if (text_content !== null) { if (text_content !== null) {
return text_content.value; return text_content.value;
} }
......
...@@ -236,7 +236,7 @@ ...@@ -236,7 +236,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>965.52522.13952.27733</string> </value> <value> <string>966.24439.33534.42308</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -254,7 +254,7 @@ ...@@ -254,7 +254,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1519836241.61</float> <float>1521824575.6</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