Bug 39809 - .required class was made too non-specific in Bootstrap upgrade
Summary: .required class was made too non-specific in Bootstrap upgrade
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Lucas Gass (lukeg)
URL:
Keywords: RM_priority
Depends on:
Blocks:
 
Reported: 2025-05-01 18:20 UTC by Caroline Cyr La Rose
Modified: 2025-08-22 08:28 UTC (History)
1 user (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This patch corrects the styling of required fields so that the text entered in the input is no longer shown in red. Previously, the .required class was incorrectly applied to the input itself rather than just the label and required indicator.
Version(s) released in:
25.11.00,25.05.03
Circulation function:


Attachments
Screen capture of the top of the description input of an existing category (16.86 KB, image/png)
2025-05-01 18:22 UTC, Caroline Cyr La Rose
Details
Screen capture of the code and description input of a new category (18.24 KB, image/png)
2025-05-01 18:22 UTC, Caroline Cyr La Rose
Details
Bug 39809: .required class was made too non-specific in Bootstrap upgrade (1.71 KB, patch)
2025-05-01 21:10 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 39809: .required class was made too non-specific in Bootstrap upgrade (1.76 KB, patch)
2025-05-02 12:47 UTC, David Nind
Details | Diff | Splinter Review
Bug 39809: .required class was made too non-specific in Bootstrap upgrade (1.83 KB, patch)
2025-05-02 13:52 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 39809: (follow-up) Remove left margin from label.required (798 bytes, patch)
2025-05-06 12:18 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 39809: (follow-up) Remove left margin from label.required (868 bytes, patch)
2025-05-07 19:46 UTC, Caroline Cyr La Rose
Details | Diff | Splinter Review
Bug 39809: .required class was made too non-specific in Bootstrap upgrade (1.89 KB, patch)
2025-07-25 16:41 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 39809: (follow-up) Remove left margin from label.required (925 bytes, patch)
2025-07-25 16:41 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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>
Comment 10 Lucas Gass (lukeg) 2025-07-25 16:41:01 UTC
Created attachment 184651 [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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 11 Lucas Gass (lukeg) 2025-07-25 16:41:04 UTC
Created attachment 184652 [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>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 12 Lucas Gass (lukeg) 2025-07-25 20:38:19 UTC
Nice work everyone!

Pushed to main for 25.11
Comment 13 Paul Derscheid 2025-08-22 08:28:05 UTC
Nice work everyone!

Pushed to 25.05.x