| Summary: | Important and mandatory select fields not highlighted on additem.pl | ||
|---|---|---|---|
| Product: | Koha | Reporter: | Emmi Takkinen <emmi.takkinen> |
| Component: | Cataloging | Assignee: | Emmi Takkinen <emmi.takkinen> |
| Status: | Failed QA --- | QA Contact: | Testopia <testopia> |
| Severity: | enhancement | ||
| Priority: | P5 - low | CC: | jrobb, lmstrand, m.de.rooy |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: | Version(s) released in: | ||
| Circulation function: | |||
| Attachments: | Bug 30618: Highlight missing mandatory select2 elements in item form checks | ||
|
Description
Emmi Takkinen
2022-04-26 07:46:45 UTC
As far as I can see, only the select2 elements are not highlighted after the page reloads when mandatory fields have not been filled. I couldn't locate how the "missing" properties to the elements' class are generated (like <input type="text" id="tag_952_subfield_y_371260" name="items.itype" class="input_marceditor items.itype noEnterSubmit missing" maxlength="9999" value="">), but if there was a check on whether the element is a pulldown list/any other type of element not getting highlighted, their styling could be processed separately. Created attachment 188207 [details] [review] Bug 30618: Highlight missing mandatory select2 elements in item form checks If one tries to add an item and mandatory or important select field isn't filled, field isn't highlighted like input fields. This patch adds correct background color to empty mandatory select2 fields. To test: 1. Add item, but leave mandatory select2 field empty (e.g. home library, itemtype). 2. Attempt to save item. => Note that field isn't highlighted. 3. Apply this patch (restart service if needed). 4. Repeat steps 1. and 2. => Field should now be highlighted. Sponsored-by: Koha-Suomi Oy I tried testing this in Chrome first and there was no change, the select2 dropdowns marked as "Required" or "Important" don't highlight after trying to add an item without them. Switching to Firefox, the highlighting works on select2 dropdowns marked as "Required", but the dropdowns marked as "Important" still don't highlight. As a testing note, I had to go to Administration > MARC bibliographic frameworks then in the proper framework, navigate to the 952 subfields to test for "Important". Aside from home/holding library, shelving location, collection code, itemtype and the various statuses (lost, not for loan, etc.) use dropdowns. |