Skip to content

Commit 26e2846

Browse files
committed
bug #19904 [Form] Fixed collapsed ChoiceType options attributes (HeahDude)
This PR was merged into the 2.7 branch. Discussion ---------- [Form] Fixed collapsed ChoiceType options attributes | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #19898 | License | MIT | Doc PR | ~ Commits ------- 7806e2a Fixed collapsed ChoiceType options attributes
2 parents 354e8fd + 7806e2a commit 26e2846

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/Symfony/Bundle/FrameworkBundle/Resources/views/Form/choice_attributes.html.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
id="<?php echo $view->escape($id) ?>" name="<?php echo $view->escape($full_name) ?>"
21
<?php if ($disabled): ?>disabled="disabled" <?php endif ?>
32
<?php foreach ($choice_attr as $k => $v): ?>
43
<?php if ($v === true): ?>

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -612,8 +612,8 @@ public function testSingleChoiceAttributesWithMainAttributes()
612612
[@class="bar&baz"]
613613
[not(@required)]
614614
[
615-
./option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"]
616-
/following-sibling::option[@value="&b"][not(@class)][not(@selected)][.="[trans]Choice&B[/trans]"]
615+
./option[@value="&a"][@selected="selected"][.="[trans]Choice&A[/trans]"][not(@id)][not(@name)]
616+
/following-sibling::option[@value="&b"][not(@class)][not(@selected)][.="[trans]Choice&B[/trans]"][not(@id)][not(@name)]
617617
]
618618
[count(./option)=2]
619619
'

0 commit comments

Comments
 (0)