Commit 2cfc0ed0 authored by Tristan Cavelier's avatar Tristan Cavelier

DATETIMEFIELDUPDATE [erp5_web_renderjs_ui] fix html5 input gadget update

rendering the gadget with the same value as rendered before causes the
gadget to be not updated even if the field has been manually edited.

/bug #20190204-39AF19
https://nexedijs.erp5.net/#/bug_module/20190204-39AF19
parent b7f126bd
......@@ -19,6 +19,12 @@
rJS(window)
.declareMethod('render', function render(options) {
var input = this.element.querySelector("input");
if (input) {
// force the state to have the current edited value
this.state.checked = input.checked;
this.state.value = input.value;
}
return this.changeState({
value: getFirstNonEmpty(options.value, ""),
checked: options.checked,
......
......@@ -214,7 +214,7 @@
</item>
<item>
<key> <string>actor</string> </key>
<value> <string>zope</string> </value>
<value> <string>ERP5TypeTestCase</string> </value>
</item>
<item>
<key> <string>comment</string> </key>
......@@ -228,7 +228,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>967.40700.16743.2833</string> </value>
<value> <string>975.16158.58810.54749</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -246,7 +246,7 @@
</tuple>
<state>
<tuple>
<float>1526653024.9</float>
<float>1556111993.61</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