Bug 39809

Summary: .required class was made too non-specific in Bootstrap upgrade
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: Signed Off --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low Keywords: RM_priority
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Screen capture of the top of the description input of an existing category
Screen capture of the code and description input of a new category
Bug 39809: .required class was made too non-specific in Bootstrap upgrade
Bug 39809: .required class was made too non-specific in Bootstrap upgrade
Bug 39809: .required class was made too non-specific in Bootstrap upgrade
Bug 39809: (follow-up) Remove left margin from label.required
Bug 39809: (follow-up) Remove left margin from label.required

Description Caroline Cyr La Rose 2025-05-01 18:20:54 UTC
In main, when I go to the patron category form, the required fields' inputs are in red and italic.

To recreate:
A.1. Go to Administration > Patron categories
A.2. Click New category
--> Notice the labels for Category code, Description and Category type are in italic (they used to be just red and bold, but not italic)
A.3. Type in a code and a description
--> Notice that the input is now in red and italic (it used to be black and regular/not italic)

B.1. Go to Administration > Patron categories
B.2. Click on an existing category
--> Notice the description inside the input field is in red and italic (it used to be black and regular/not italic)
Comment 1 Caroline Cyr La Rose 2025-05-01 18:22:17 UTC
Created attachment 181832 [details]
Screen capture of the top of the description input of an existing category
Comment 2 Caroline Cyr La Rose 2025-05-01 18:22:55 UTC
Created attachment 181833 [details]
Screen capture of the code and description input of a new category
Comment 3 Owen Leonard 2025-05-01 21:03:37 UTC
I mistakenly made the ".required" class too non-specific in the Bootstrap upgrade. <input> tags should not pick up the styles applied to <label>, <span>, and <div>.
Comment 4 Owen Leonard 2025-05-01 21:10:55 UTC
Created attachment 181840 [details] [review]
Bug 39809: .required class was made too non-specific in Bootstrap upgrade

This patch corrects some CSS which was broken during the upgrade to
Bootstrap 5. The .required class should not add any style differences to
form fields.

To test, apply the patch and rebuild the staff interface CSS.

- Go to Administration -> Patron categories.
- Edit an existing category.
- Confirm that the contents of input fields are not styled red and
  italic.
Comment 5 David Nind 2025-05-02 12:47:51 UTC
Created attachment 181857 [details] [review]
Bug 39809: .required class was made too non-specific in Bootstrap upgrade

This patch corrects some CSS which was broken during the upgrade to
Bootstrap 5. The .required class should not add any style differences to
form fields.

To test, apply the patch and rebuild the staff interface CSS.

- Go to Administration -> Patron categories.
- Edit an existing category.
- Confirm that the contents of input fields are not styled red and
  italic.

Signed-off-by: David Nind <david@davidnind.com>
Comment 6 Caroline Cyr La Rose 2025-05-02 13:52:29 UTC
Created attachment 181868 [details] [review]
Bug 39809: .required class was made too non-specific in Bootstrap upgrade

This patch corrects some CSS which was broken during the upgrade to
Bootstrap 5. The .required class should not add any style differences to
form fields.

To test, apply the patch and rebuild the staff interface CSS.

- Go to Administration -> Patron categories.
- Edit an existing category.
- Confirm that the contents of input fields are not styled red and
  italic.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Comment 7 Caroline Cyr La Rose 2025-05-02 13:53:19 UTC
Thank you Owen, and David for testing. I added my sign-off too, even if it doesn't add much, but just as a thanks! :)
Comment 8 Owen Leonard 2025-05-06 12:18:53 UTC
Created attachment 181966 [details] [review]
Bug 39809: (follow-up) Remove left margin from label.required

The left margin is only necessary for span.required
Comment 9 Caroline Cyr La Rose 2025-05-07 19:46:48 UTC
Created attachment 182044 [details] [review]
Bug 39809: (follow-up) Remove left margin from label.required

The left margin is only necessary for span.required

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>