Bug 21148 - Dropdowns styled by the Select2 plugin do not highlight missing required fields
Summary: Dropdowns styled by the Select2 plugin do not highlight missing required fields
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 13501 14662
Blocks:
  Show dependency treegraph
 
Reported: 2018-08-02 12:46 UTC by Owen Leonard
Modified: 2019-10-14 19:58 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 21148: Dropdowns styled by the Select2 plugin do not highlight missing required fields (1.21 KB, patch)
2018-08-02 13:52 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 21148: Dropdowns styled by the Select2 plugin do not highlight missing required fields (1.28 KB, patch)
2018-08-02 14:09 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 21148: Dropdowns styled by the Select2 plugin do not highlight missing required fields (1.35 KB, patch)
2018-08-06 17:22 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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 2018-08-09 12:38:33 UTC
Awesome work all!

Pushed to master for 18.11
Comment 5 Martin Renvoize 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