From 183e2e4ce4c1619bdb9ace0cd86c5b9163bdf5b2 Mon Sep 17 00:00:00 2001 From: MatTheCat Date: Tue, 4 Aug 2015 12:12:12 +0200 Subject: [PATCH 1/2] [Twig][Bridge] force space between widget and label in checkbox_radio_label block --- .../Twig/Resources/views/Form/bootstrap_3_layout.html.twig | 3 +-- 1 file changed, 1 insertion(+), 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 6c92dc8b6b02d..465f8d9c4d155 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 @@ -168,8 +168,7 @@ {% set label = name|humanize %} {% endif %} - {{- widget|raw -}} - {{- label is not sameas(false) ? label|trans({}, translation_domain) -}} + {{- widget|raw }} {{ label is not sameas(false) ? label|trans({}, translation_domain) -}} {% endif %} {% endblock checkbox_radio_label %} From ecc957cb18174d5799f669bbd322d9ce3700741a Mon Sep 17 00:00:00 2001 From: MatTheCat Date: Thu, 6 Aug 2015 09:32:52 +0200 Subject: [PATCH 2/2] update tests --- .../Tests/AbstractBootstrap3LayoutTest.php | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/Symfony/Component/Form/Tests/AbstractBootstrap3LayoutTest.php b/src/Symfony/Component/Form/Tests/AbstractBootstrap3LayoutTest.php index d94ae833289d6..4b4afbc6f77e7 100644 --- a/src/Symfony/Component/Form/Tests/AbstractBootstrap3LayoutTest.php +++ b/src/Symfony/Component/Form/Tests/AbstractBootstrap3LayoutTest.php @@ -162,7 +162,7 @@ public function testCheckedCheckbox() [@class="checkbox"] [ ./label - [.="[trans]Name[/trans]"] + [.=" [trans]Name[/trans]"] [ ./input[@type="checkbox"][@name="name"][@id="my&id"][@class="my&class"][@checked="checked"][@value="1"] ] @@ -180,7 +180,7 @@ public function testUncheckedCheckbox() [@class="checkbox"] [ ./label - [.="[trans]Name[/trans]"] + [.=" [trans]Name[/trans]"] [ ./input[@type="checkbox"][@name="name"][@id="my&id"][@class="my&class"][not(@checked)] ] @@ -200,7 +200,7 @@ public function testCheckboxWithValue() [@class="checkbox"] [ ./label - [.="[trans]Name[/trans]"] + [.=" [trans]Name[/trans]"] [ ./input[@type="checkbox"][@name="name"][@id="my&id"][@class="my&class"][@value="foo&bar"] ] @@ -557,7 +557,7 @@ public function testSingleChoiceExpanded() [@class="radio"] [ ./label - [.="[trans]Choice&A[/trans]"] + [.=" [trans]Choice&A[/trans]"] [ ./input[@type="radio"][@name="name"][@id="name_0"][@value="&a"][@checked] ] @@ -566,7 +566,7 @@ public function testSingleChoiceExpanded() [@class="radio"] [ ./label - [.="[trans]Choice&B[/trans]"] + [.=" [trans]Choice&B[/trans]"] [ ./input[@type="radio"][@name="name"][@id="name_1"][@value="&b"][not(@checked)] ] @@ -593,7 +593,7 @@ public function testSingleChoiceExpandedWithPlaceholder() [@class="radio"] [ ./label - [.="[trans]Test&Me[/trans]"] + [.=" [trans]Test&Me[/trans]"] [ ./input[@type="radio"][@name="name"][@id="name_placeholder"][not(@checked)] ] @@ -602,7 +602,7 @@ public function testSingleChoiceExpandedWithPlaceholder() [@class="radio"] [ ./label - [.="[trans]Choice&A[/trans]"] + [.=" [trans]Choice&A[/trans]"] [ ./input[@type="radio"][@name="name"][@id="name_0"][@checked] ] @@ -611,7 +611,7 @@ public function testSingleChoiceExpandedWithPlaceholder() [@class="radio"] [ ./label - [.="[trans]Choice&B[/trans]"] + [.=" [trans]Choice&B[/trans]"] [ ./input[@type="radio"][@name="name"][@id="name_1"][not(@checked)] ] @@ -637,7 +637,7 @@ public function testSingleChoiceExpandedWithBooleanValue() [@class="radio"] [ ./label - [.="[trans]Choice&A[/trans]"] + [.=" [trans]Choice&A[/trans]"] [ ./input[@type="radio"][@name="name"][@id="name_0"][@checked] ] @@ -646,7 +646,7 @@ public function testSingleChoiceExpandedWithBooleanValue() [@class="radio"] [ ./label - [.="[trans]Choice&B[/trans]"] + [.=" [trans]Choice&B[/trans]"] [ ./input[@type="radio"][@name="name"][@id="name_1"][not(@checked)] ] @@ -673,7 +673,7 @@ public function testMultipleChoiceExpanded() [@class="checkbox"] [ ./label - [.="[trans]Choice&A[/trans]"] + [.=" [trans]Choice&A[/trans]"] [ ./input[@type="checkbox"][@name="name[]"][@id="name_0"][@checked][not(@required)] ] @@ -682,7 +682,7 @@ public function testMultipleChoiceExpanded() [@class="checkbox"] [ ./label - [.="[trans]Choice&B[/trans]"] + [.=" [trans]Choice&B[/trans]"] [ ./input[@type="checkbox"][@name="name[]"][@id="name_1"][not(@checked)][not(@required)] ] @@ -691,7 +691,7 @@ public function testMultipleChoiceExpanded() [@class="checkbox"] [ ./label - [.="[trans]Choice&C[/trans]"] + [.=" [trans]Choice&C[/trans]"] [ ./input[@type="checkbox"][@name="name[]"][@id="name_2"][@checked][not(@required)] ] pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy