Problem/Motivation

In the form-element.twig template the description_classes are not being added in the 'before' case as in the 'after' case:

    {% if description_display == 'before' and description.content %}
      <div{{description.attributes}}>
        {{ description.content }}
      </div>

Whereas in the 'after' case we have the following:

  {% if description_display in ['after', 'invisible'] and description.content %}
    <small{{description.attributes.addClass(description_classes)}}>
      {{ description.content }}
    </small>

Proposed resolution

Change the 'before' (line 89) to add the same classes as the in 'after' (line 115).

Issue fork radix-3552730

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

arx-e created an issue. See original summary.

arx-e’s picture

Issue summary: View changes
arx-e’s picture

Title: Description has different markup in the "before" part in form-element.twig » Description classes missing in the "before" part in form-element.twig
Issue summary: View changes

arx-e changed the visibility of the branch 3552730-description-has-different to hidden.

doxigo’s picture

Status: Active » Fixed

Thanks a lot Aris, merged.

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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