Skip to content

Commit 0c6eca3

Browse files
committed
feature symfony#24148 [Form] Hide label button when its setted to false (TeLiXj)
This PR was submitted for the 2.7 branch but it was merged into the 3.4 branch instead (closes symfony#24148). Discussion ---------- [Form] Hide label button when its setted to false | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | no | Fixed tickets | | License | MIT | Doc PR | Added same behaviour in buttons like in other form components when label is setted to false, don't show it. It's very useful with buttons with icon and without text. Commits ------- e319075 Hide label button when its setted to false
2 parents 7799881 + e319075 commit 0c6eca3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@
216216
{%- endblock range_widget %}
217217

218218
{%- block button_widget -%}
219-
{%- if label is empty -%}
219+
{%- if label is not same as(false) and label is empty -%}
220220
{%- if label_format is not empty -%}
221221
{% set label = label_format|replace({
222222
'%name%': name,

0 commit comments

Comments
 (0)