Skip to content

Commit

Permalink
bug #53926 [TwigBridge] foundation 5 layout: use form_label_content b…
Browse files Browse the repository at this point in the history
…lock for checkbox and radio labels (wetternest)

This PR was squashed before being merged into the 6.4 branch.

Discussion
----------

[TwigBridge] foundation 5 layout: use form_label_content block for checkbox and radio labels

…dio labels

| Q             | A
| ------------- | ---
| Branch?       | 6.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Issues        | Fix #53925
| License       | MIT

[Twig Bridge] Foundation5 Form Layout

use the block `form_label_content` to display the label content of checkboxes and radios in order to support the `label_html` flag

Commits
-------

e4eca7c43f [TwigBridge] foundation 5 layout: use form_label_content block for checkbox and radio labels
  • Loading branch information
nicolas-grekas committed Feb 15, 2024
2 parents 03ffbf4 + db6ac9b commit 256f330
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Resources/views/Form/foundation_5_layout.html.twig
Expand Up @@ -269,7 +269,9 @@
{% endif %}
<label{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}>
{{ widget|raw }}
{{ translation_domain is same as(false) ? label : label|trans(label_translation_parameters, translation_domain) }}
{%- if label is not same as(false) -%}
{{- block('form_label_content') -}}
{%- endif -%}
</label>
{%- endblock checkbox_radio_label %}

Expand Down

0 comments on commit 256f330

Please sign in to comment.