Styling on eg-org-select box to show required-ness

Bug #1933498 reported by Tiffany Little
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Evergreen
New
Undecided
Unassigned

Bug Description

In the new Angular forms, it can now pick up which fields are required from the fieldmapper and show a red indicator to show that the field is required. However, there is often/usually a box for an org select that *is* required, but there's no styling to show it.

It would be good if we could add similar styling around eg-org-select boxes to show that they're required.

tags: added: usability
Revision history for this message
Tiffany Little (tslittle) wrote :
tags: added: pullrequest
Revision history for this message
Galen Charlton (gmc) wrote :

Unless I'm missing something, the patch would display all OU selectors as being required.

It's not common, but there are some cases where an OU field is optional, including the bib record owner and line item details owning library. Consequently, I think eg-org-select would need to get a "required" or "mandatory" @Input that eg-fm-record-editor can use so that requiredness can be dynamic, so to speak.

Revision history for this message
Tiffany Little (tslittle) wrote :

Good point.

Follow-up commit: https://git.evergreen-ils.org/?p=working/Evergreen.git;a=commit;h=c2535997f039726b43f3969f9059943452fbd885

Since it's most common that org-select should be required, this makes it required unless otherwise specified.

Revision history for this message
Tiffany Little (tslittle) wrote :

P.S. For anyone testing this during Sept 2021 Bug squashing, I've explicitly set the Angular Load MARC Order Records Ordering Agency box to required=false to show that it can be unset when needed.

Revision history for this message
Galen Charlton (gmc) wrote :

I would suggest a different approach in the interest of consistency:

- Make the default value of the required @Input be false; no other custom widget defaults to required, nor do native HTML inputs.
- Update fm-editor to have it check field.isRequired() to set "required" for eg-org-select.

tags: removed: pullrequest
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.