[Form] Fixed read_only attribute for expanded fields #3258

Merged
merged 2 commits into from Feb 4, 2012

Conversation

Projects
None yet
3 participants
Contributor

helmer commented Feb 2, 2012

Expanded choice widgets lose the knowledge of read_only attribute value.

Fixes bug introduced by #3193

Contributor

helmer commented Feb 2, 2012

Please hold before merging, @bschussek had some thoughts about my changes in ChoiceType, waiting for feedback.

Member

webmozart commented Feb 2, 2012

I'm fine with the refactoring then, but please split it into two commits at least. The changes in ChoiceType have nothing in common with the actual issue here.

Contributor

helmer commented Feb 2, 2012

Tests added.

@webmozart webmozart and 1 other commented on an outdated diff Feb 3, 2012

.../Component/Form/Extension/Core/Type/FieldTypeTest.php
@@ -150,6 +150,27 @@ public function testPassIdAndNameToViewWithGrandParent()
$this->assertEquals('parent[child][grand_child]', $view['child']['grand_child']->get('full_name'));
}
+ public function testReadOnlyInheritance()
@webmozart

webmozart Feb 3, 2012

Member

You are testing three different cases, so please split them up into three different tests with appropiate names.

@helmer

helmer Feb 3, 2012

Contributor

Fixed.

Member

webmozart commented Feb 3, 2012

Great, thanks.

@fabpot 👍

@fabpot fabpot added a commit that referenced this pull request Feb 4, 2012

@fabpot fabpot merged branch helmer/readonly_fix (PR #3258)
Commits
-------

8321593 [Form] DRYed ChoiceType
0753cee [Form] Fixed read_only attribute for expanded fields

Discussion
----------

[Form] Fixed read_only attribute for expanded fields

Expanded choice widgets lose the knowledge of read_only attribute value.

Fixes bug introduced by #3193

---------------------------------------------------------------------------

by helmer at 2012-02-02T16:24:50Z

Please hold before merging, @bschussek had some thoughts about my changes in ``ChoiceType``, waiting for feedback.

---------------------------------------------------------------------------

by bschussek at 2012-02-02T16:33:12Z

I'm fine with the refactoring then, but please split it into two commits at least. The changes in ChoiceType have nothing in common with the actual issue here.

---------------------------------------------------------------------------

by helmer at 2012-02-02T19:40:39Z

Tests added.

---------------------------------------------------------------------------

by bschussek at 2012-02-03T10:14:32Z

Great, thanks.

@fabpot 👍
5251177

@fabpot fabpot merged commit 8321593 into symfony:master Feb 4, 2012

@vicb vicb added a commit to vicb/symfony that referenced this pull request Apr 27, 2012

@vicb vicb [Form] Revert "merged branch helmer/readonly_fix (PR #3258)"
This reverts commit 5251177, reversing
changes made to ffef177.
43604e2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment