This is a followup to #2668298: Custom Search Module Conflict.
Labels for required checkboxes don't get the .form-required class.

In 2668298 #6 Mario Steinitz suggested a change but didn't provide a patch and a work around was used instead. 2668298-10 approved the change but later the issue was closed without comment.

I have rerolled his comment into a patch against 8.x-4.x. I checked out the repo as it was when he made that comment, applied and committed his change. I then checked out 8.x-4.x and merged with that commit. Some manual merging was required, and I did the best I could, but I don't understand the code involved very well, so it will likely need some help to prevent regressions.

The only other change I made was

-    <label{{ label.attributes }}>
+    <label{{ label.attributes.addClass(label_classes) }}>

so that the label classes assembled above would actually be applied.

Comments

jacob.embree created an issue. See original summary.

jacob.embree’s picture

Issue summary: View changes
hatuhay’s picture

Status: Needs review » Fixed

  • hatuhay committed 7683f9b on 8.x-4.x authored by jacob.embree
    Issue #3104674 by jacob.embree: No form-required class on required...
jacob.embree’s picture

This was actually fixed by fe7dd07c23a93f9a82ca611b5698f3287f323918.

hatuhay’s picture

Status: Fixed » Closed (works as designed)
jacob.embree’s picture

Status: Closed (works as designed) » Fixed

You probably meant to leave the issue as "Fixed". Here's more information about Drupal.org Status settings of issues.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.