8000 feature #50770 [TwigBridge] Allow to change element for `form_help` b… · symfony/symfony@6178664 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6178664

Browse files
feature #50770 [TwigBridge] Allow to change element for form_help block (seb-jean)
This PR was merged into the 6.4 branch. Discussion ---------- [TwigBridge] Allow to change element for `form_help` block | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | no | New feature? | yes | Deprecations? | no | License | MIT Currently, the element for the block `form_help` is a `div`. With this feature, we are free to change it Commits ------- e08f544 Allows to change element for form_help block
2 parents 7f7687a + e08f544 commit 6178664

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

+2-2
< 851E td data-grid-cell-id="diff-f7db33ae7aed2489596c14ca3302fe1fd98e93b5ca063c972d55a8c3dc4a3906-329-329-2" data-line-anchor="diff-f7db33ae7aed2489596c14ca3302fe1fd98e93b5ca063c972d55a8c3dc4a3906R329" data-selected="false" role="gridcell" style="background-color:var(--bgColor-default);padding-right:24px" tabindex="-1" valign="top" class="focusable-grid-cell diff-text-cell right-side-diff-cell left-side">
{% block form_help -%}
Original file line numberDiff line numberDiff line change
@@ -329,9 +329,9 @@
329329
330330
{%- if help is not empty -%}
331331
{%- set help_attr = help_attr|merge({class: (help_attr.class|default('') ~ ' help-text')|trim}) -%}
332-
<div id="{{ id }}_help"{% with { attr: help_attr } %}{{ block('attributes') }}{% endwith %}>
332+
<{{ element|default('div') }} id="{{ id }}_help"{% with { attr: help_attr } %}{{ block('attributes') }}{% endwith %}>
333333
{{- block('form_help_content') -}}
334-
</div>
334+
</{{ element|default('div') }}>
335335
{%- endif -%}
336336
{%- endblock form_help %}
337337

0 commit comments

Comments
 (0)
0