8000 bug #53926 [TwigBridge] foundation 5 layout: use form_label_content b… · symfony/symfony@e81547b · GitHub
[go: up one dir, main page]

Skip to content

Commit e81547b

Browse files
bug #53926 [TwigBridge] foundation 5 layout: use form_label_content block 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 ------- e4eca7c [TwigBridge] foundation 5 layout: use form_label_content block for checkbox and radio labels
2 parents 7fe91b6 + e4eca7c commit e81547b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Symfony/Bridge/Twig/Resources/views/Form/foundation_5_layout.html.twig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,9 @@
269269
{% endif %}
270270
<label{% with { attr: label_attr } %}{{ block('attributes') }}{% endwith %}>
271271
{{ widget|raw }}
272-
{{ translation_domain is same as(false) ? label : label|trans(label_translation_parameters, translation_domain) }}
272+
{%- if label is not same as(false) -%}
273+
{{- block('form_label_content') -}}
274+
{%- endif -%}
273275
</label>
274276
{%- endblock checkbox_radio_label %}
275277

0 commit comments

Comments
 (0)
0