Commit f76fb28f authored by Tomáš Peterka's avatar Tomáš Peterka

[renderjs_ui] Small improvements (readonly field is always valid + comments)

parent d4f5fb83
...@@ -77,8 +77,9 @@ ...@@ -77,8 +77,9 @@
form_options.form_definition = gadget.state.form_definition; form_options.form_definition = gadget.state.form_definition;
form_options.view = gadget.state.view; form_options.view = gadget.state.view;
form_options.jio_key = gadget.state.jio_key; form_options.jio_key = gadget.state.jio_key;
form_options.editable = 0; form_options.editable = 0; // because for editable=1 there is a special
// page template 'pt_form_editable'. Once it is
// is removed, this 0 should turn into gadget.state.editable
return erp5_form.render(form_options); return erp5_form.render(form_options);
}) })
......
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>961.16419.13605.17578</string> </value> <value> <string>961.60785.60114.8243</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1502116554.64</float> <float>1504874056.9</float>
<string>UTC</string> <string>UTC</string>
</tuple> </tuple>
</state> </state>
......
...@@ -69,6 +69,11 @@ ...@@ -69,6 +69,11 @@
} }
data[this.state.name] = this.state.text_content || this.state.inner_html || ""; data[this.state.name] = this.state.text_content || this.state.inner_html || "";
return data; return data;
})
/** Readonly fields are always valid */
.declareMethod("checkValidity", function () {
return true;
}); });
}(window, document, rJS)); }(window, document, rJS));
\ No newline at end of file
...@@ -230,7 +230,7 @@ ...@@ -230,7 +230,7 @@
</item> </item>
<item> <item>
<key> <string>serial</string> </key> <key> <string>serial</string> </key>
<value> <string>961.46335.40182.23005</string> </value> <value> <string>961.57904.26336.47172</string> </value>
</item> </item>
<item> <item>
<key> <string>state</string> </key> <key> <string>state</string> </key>
...@@ -248,7 +248,7 @@ ...@@ -248,7 +248,7 @@
</tuple> </tuple>
<state> <state>
<tuple> <tuple>
<float>1503909097.14</float> <float>1504605935.05</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