Commit db52797a authored by Romain Courteaud's avatar Romain Courteaud

[erp5_web_renderjs_ui] LabelField should not write in subgadget span

Regression introduced by nexedi/erp5@cf1a0610
parent ae2c27cd
......@@ -124,15 +124,21 @@
if (modification_dict.hasOwnProperty('error_text')) {
// first remove old errors
span = this.state.container_element.querySelector('span');
if (span) {
this.state.container_element.removeChild(span);
span = this.state.container_element.lastElementChild;
if ((span !== null) && (span.tagName.toLowerCase() !== 'span')) {
span = null;
}
// display new error if present
if (this.state.error_text) {
span = document.createElement('span');
span.textContent = this.state.error_text;
this.state.container_element.appendChild(span);
if (span === null) {
span = document.createElement('span');
span.textContent = this.state.error_text;
this.state.container_element.appendChild(span);
} else {
span.textContent = this.state.error_text;
}
} else if (span !== null) {
this.state.container_element.removeChild(span);
}
}
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>961.46539.43459.6519</string> </value>
<value> <string>964.7149.35202.27306</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1503932157.58</float>
<float>1513181723.22</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