Commit eb5f1fb1 authored by Nicolas Wavrant's avatar Nicolas Wavrant

erp5_web_renderjs_ui: display error messages in hidden fields

As it is a common pattern to set validators on hidden fields
to display custom errors to users.
parent 3b9d23bf
......@@ -107,7 +107,7 @@
var gadget = this,
span;
if (gadget.state.hidden) {
if (gadget.state.hidden && !modification_dict.error_text) {
this.element.hidden = true;
} else {
this.element.hidden = false;
......
......@@ -230,7 +230,7 @@
</item>
<item>
<key> <string>serial</string> </key>
<value> <string>964.59013.39016.42820</string> </value>
<value> <string>966.58912.4243.58521</string> </value>
</item>
<item>
<key> <string>state</string> </key>
......@@ -248,7 +248,7 @@
</tuple>
<state>
<tuple>
<float>1516293734.37</float>
<float>1523892720.71</float>
<string>UTC</string>
</tuple>
</state>
......
......@@ -48,6 +48,8 @@ Check that user gets notified if there is an error on a hidden field.
'text': 'Input data has errors.'}">
<tal:block metal:use-macro="here/Zuite_CommonTemplateForRenderjsUi/macros/wait_for_notification" />
</tal:block>
<tr><td>verifyVisible</td>
<td>//div[@data-gadget-scope='field_my_quantity']//span[text()="Quantity can't be negative."]</td><td></td></tr>
</tbody>
</table>
......
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