From 96f82f5da34873096a1c3137dcf37d12b531b909 Mon Sep 17 00:00:00 2001 From: TeLiXj Date: Mon, 11 Sep 2017 10:56:17 +0200 Subject: [PATCH] Hide label button when its setted to false 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 --- .../Bridge/Twig/Resources/views/Form/form_div_layout.html.twig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig b/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig index a27c81dd495ae..d00f24821bc85 100644 --- a/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig +++ b/src/Symfony/Bridge/Twig/Resources/views/Form/form_div_layout.html.twig @@ -176,7 +176,7 @@ {%- endblock email_widget -%} {%- block button_widget -%} - {%- if label is empty -%} + {%- if label is not same as(false) and label is empty -%} {%- if label_format is not empty -%} {% set label = label_format|replace({ '%name%': name,