Skip to content

Commit e93ad7d

Browse files
committed
Merge branch '2.8' into 3.0
* 2.8: Improved Bootstrap form theme for hidden fields [WebProfilerBundle] Fix design issue in profiler when having errors in forms bumped Symfony version to 2.8.4 updated VERSION for 2.8.3 updated CHANGELOG for 2.8.3 bumped Symfony version to 2.7.11 updated VERSION for 2.7.10 updated CHANGELOG for 2.7.10
2 parents c2f6078 + 1a77a44 commit e93ad7d

File tree

4 files changed

+15
-15
lines changed

4 files changed

+15
-15
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
{# Widgets #}
44

55
{% block form_widget_simple -%}
6-
{% if type is not defined or 'file' != type %}
6+
{% if type is not defined or type not in ['file', 'hidden'] %}
77
{%- set attr = attr|merge({class: (attr.class|default('') ~ ' form-control')|trim}) -%}
88
{% endif %}
99
{{- parent() -}}

src/Symfony/Bridge/Twig/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"require-dev": {
2323
"symfony/asset": "~2.8|~3.0",
2424
"symfony/finder": "~2.8|~3.0",
25-
"symfony/form": "~2.8|~3.0",
25+
"symfony/form": "~2.8.3|~3.0",
2626
"symfony/http-kernel": "~2.8|~3.0",
2727
"symfony/polyfill-intl-icu": "~1.0",
2828
"symfony/routing": "~2.8|~3.0",

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -427,17 +427,17 @@
427427
{% import _self as tree %}
428428
<li>
429429
<div class="tree-inner" data-tab-target-id="{{ data.id }}-details">
430+
{% if data.errors is defined and data.errors|length > 0 %}
431+
<div class="badge-error">{{ data.errors|length }}</div>
432+
{% endif %}
433+
430434
{% if data.children is not empty %}
431435
<a class="toggle-button" data-toggle-target-id="{{ data.id }}-children" href="#"><span class="toggle-icon"></span></a>
432436
{% else %}
433437
<div class="toggle-icon empty"></div>
434438
{% endif %}
435439

436440
{{ name|default('(no name)') }} {% if data.type_class is defined %}[<abbr title="{{ data.type_class }}">{{ data.type_class|split('\\')|last }}</abbr>]{% endif %}
437-
438-
{% if data.errors is defined and data.errors|length > 0 %}
439-
<div class="badge-error">{{ data.errors|length }}</div>
440-
{% endif %}
441441
</div>
442442

443443
{% if data.children is not empty %}

src/Symfony/Component/Form/Tests/AbstractBootstrap3LayoutTest.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ public function testSingleChoiceExpanded()
687687
./input[@type="radio"][@name="name"][@id="name_1"][@value="&b"][not(@checked)]
688688
]
689689
]
690-
/following-sibling::input[@type="hidden"][@id="name__token"][@class="form-control"]
690+
/following-sibling::input[@type="hidden"][@id="name__token"]
691691
]
692692
'
693693
);
@@ -843,7 +843,7 @@ public function testSingleChoiceExpandedWithoutTranslation()
843843
./input[@type="radio"][@name="name"][@id="name_1"][@value="&b"][not(@checked)]
844844
]
845845
]
846-
/following-sibling::input[@type="hidden"][@id="name__token"][@class="form-control"]
846+
/following-sibling::input[@type="hidden"][@id="name__token"]
847847
]
848848
'
849849
);
@@ -879,7 +879,7 @@ public function testSingleChoiceExpandedAttributes()
879879
./input[@type="radio"][@name="name"][@id="name_1"][@value="&b"][not(@checked)][@class="foo&bar"]
880880
]
881881
]
882-
/following-sibling::input[@type="hidden"][@id="name__token"][@class="form-control"]
882+
/following-sibling::input[@type="hidden"][@id="name__token"]
883883
]
884884
'
885885
);
@@ -925,7 +925,7 @@ public function testSingleChoiceExpandedWithPlaceholder()
925925
./input[@type="radio"][@name="name"][@id="name_1"][not(@checked)]
926926
]
927927
]
928-
/following-sibling::input[@type="hidden"][@id="name__token"][@class="form-control"]
928+
/following-sibling::input[@type="hidden"][@id="name__token"]
929929
]
930930
'
931931
);
@@ -1007,7 +1007,7 @@ public function testSingleChoiceExpandedWithBooleanValue()
10071007
./input[@type="radio"][@name="name"][@id="name_1"][not(@checked)]
10081008
]
10091009
]
1010-
/following-sibling::input[@type="hidden"][@id="name__token"][@class="form-control"]
1010+
/following-sibling::input[@type="hidden"][@id="name__token"]
10111011
]
10121012
'
10131013
);
@@ -1052,7 +1052,7 @@ public function testMultipleChoiceExpanded()
10521052
./input[@type="checkbox"][@name="name[]"][@id="name_2"][@checked][not(@required)]
10531053
]
10541054
]
1055-
/following-sibling::input[@type="hidden"][@id="name__token"][@class="form-control"]
1055+
/following-sibling::input[@type="hidden"][@id="name__token"]
10561056
]
10571057
'
10581058
);
@@ -1218,7 +1218,7 @@ public function testMultipleChoiceExpandedWithoutTranslation()
12181218
./input[@type="checkbox"][@name="name[]"][@id="name_2"][@checked][not(@required)]
12191219
]
12201220
]
1221-
/following-sibling::input[@type="hidden"][@id="name__token"][@class="form-control"]
1221+
/following-sibling::input[@type="hidden"][@id="name__token"]
12221222
]
12231223
'
12241224
);
@@ -1264,7 +1264,7 @@ public function testMultipleChoiceExpandedAttributes()
12641264
./input[@type="checkbox"][@name="name[]"][@id="name_2"][@checked][not(@required)]
12651265
]
12661266
]
1267-
/following-sibling::input[@type="hidden"][@id="name__token"][@class="form-control"]
1267+
/following-sibling::input[@type="hidden"][@id="name__token"]
12681268
]
12691269
'
12701270
);
@@ -1766,7 +1766,7 @@ public function testHidden()
17661766
'/input
17671767
[@type="hidden"]
17681768
[@name="name"]
1769-
[@class="my&class form-control"]
1769+
[@class="my&class"]
17701770
[@value="foo&bar"]
17711771
'
17721772
);

0 commit comments

Comments
 (0)