Commit 824d41bc authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_jio: Support Required on textarea (Editor)

parent dacfeb78
......@@ -150,18 +150,18 @@
}
function render_textarea(json_field, default_value, data_format, is_required) {
var value = '';
var property_dict = {"data-format": data_format};
if (default_value !== undefined) {
if (default_value instanceof Array) {
value = default_value.join("\n");
property_dict.value = default_value.join("\n");
} else {
value = default_value;
property_dict.value = default_value;
}
}
return domsugar('textarea', {
value: value,
"data-format": data_format
});
if (is_required) {
property_dict.required = true;
}
return domsugar('textarea', property_dict);
}
function render_field(json_field, default_value, is_required) {
......
......@@ -298,7 +298,7 @@
</tuple>
<state>
<tuple>
<float>1666965524.99</float>
<float>1666975592.36</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