• Gabriel Monnerat's avatar
    erp5_web_renderjs_ui: Improve fields to propagate error_text · ea219b74
    Gabriel Monnerat authored
    * change the label field to not display the error text by default
    * change all html5 fields (input, select, textarea) to add a custom *invalid* class when the field is invalid
    * change all html5 fields to listen to the `focus` and `blur` event (with the renderjs onEvent method)
      Then, acquire (with `declareAcquiredMethod`) and call `notifyFocus` / `notifyBlur` methods respectively.
    * change the label field to handle `notifyFocus` / `notifyBlur` (with `allowPublicAcquisition`).
      Change the validation error text display state depending on the field status
    * Trigger onStateChange to set invalid class. If error comes from input field, we need to change state locally to set invalid class
    * Regenerate gadget_erp5_nojqm.css from  erp5less.css using http://lesscss.org/less-preview/
    * Textarea gadget should not prevent default when invalid event is triggered
    * Support notifyFocus and notifyBlur in panel
    ea219b74
rjs_gadget_html5_select_js.js 5.2 KB