From 96896390d722f7da9935131145f9cb9e2ffd76df Mon Sep 17 00:00:00 2001 From: ogizanagi Date: Fri, 27 Feb 2015 01:42:10 +0100 Subject: [PATCH] [TwigBridge] Bootstrap Layout - Fix the label of checkbox cannot be empty --- .../Twig/Resources/views/Form/bootstrap_3_layout.html.twig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig index f82979cd62..8aa5ceabc9 100644 --- a/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig +++ b/src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_layout.html.twig @@ -164,12 +164,12 @@ {% if parent_label_class is defined %} {% set label_attr = label_attr|merge({class: (label_attr.class|default('') ~ ' ' ~ parent_label_class)|trim}) %} {% endif %} - {% if label is empty %} + {% if label is not sameas(false) and label is empty %} {% set label = name|humanize %} {% endif %} {{ widget|raw }} - {{ label|trans({}, translation_domain) }} + {{ label is not sameas(false) ? label|trans({}, translation_domain) }} {% endif %} {% endblock checkbox_radio_label %}