Bug 21148

Summary: Dropdowns styled by the Select2 plugin do not highlight missing required fields
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, martin.renvoize, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 13501, 14662    
Bug Blocks:    
Attachments: Bug 21148: Dropdowns styled by the Select2 plugin do not highlight missing required fields
Bug 21148: Dropdowns styled by the Select2 plugin do not highlight missing required fields
Bug 21148: Dropdowns styled by the Select2 plugin do not highlight missing required fields

Description Owen Leonard 2018-08-02 12:46:16 UTC
If you have a field marked as mandatory in your item framework and that field is styled by the Select2 plugin, it is not highlighted in the same way other fields are when you try to submit an empty mandatory value. Other fields get a yellow background.

There is custom CSS for the Select2plugin which is supposed to do this job, but it doesn't appear to get getting applied.
Comment 1 Owen Leonard 2018-08-02 13:52:32 UTC
Created attachment 77442 [details] [review]
Bug 21148: Dropdowns styled by the Select2 plugin do not highlight missing required fields

This patch adds some CSS to target mandatory fields on the add item
screen which are styled by the Select2 plugin.

To test you must have at least one item field marked mandatory and
linked to an authorized value.

Open the add item form for an existing record. Try to submit the form
without making a selection in the mandatory dropdown. You should get an
alert warning you that you have empty mandatory fields, and the field
should be highlighted in yellow.
Comment 2 Katrin Fischer 2018-08-02 14:09:34 UTC
Created attachment 77446 [details] [review]
Bug 21148: Dropdowns styled by the Select2 plugin do not highlight missing required fields

This patch adds some CSS to target mandatory fields on the add item
screen which are styled by the Select2 plugin.

To test you must have at least one item field marked mandatory and
linked to an authorized value.

Open the add item form for an existing record. Try to submit the form
without making a selection in the mandatory dropdown. You should get an
alert warning you that you have empty mandatory fields, and the field
should be highlighted in yellow.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 3 Jonathan Druart 2018-08-06 17:22:10 UTC
Created attachment 77494 [details] [review]
Bug 21148: Dropdowns styled by the Select2 plugin do not highlight missing required fields

This patch adds some CSS to target mandatory fields on the add item
screen which are styled by the Select2 plugin.

To test you must have at least one item field marked mandatory and
linked to an authorized value.

Open the add item form for an existing record. Try to submit the form
without making a selection in the mandatory dropdown. You should get an
alert warning you that you have empty mandatory fields, and the field
should be highlighted in yellow.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Nick Clemens (kidclamp) 2018-08-09 12:38:33 UTC
Awesome work all!

Pushed to master for 18.11
Comment 5 Martin Renvoize (ashimema) 2018-08-10 07:33:35 UTC
Pushed to 18.05.x for 18.05.03
Comment 6 Fridolin Somers 2018-09-21 10:32:42 UTC
Pushed to 17.11.x for 17.11.10