merged branch alexandresalome/fix-form-choice-translation-expanded (PR #3166)
Commits
-------
0513eb1
[Form] Pass translation domain to the sub-forms when choice list is expanded
Discussion
----------
[Form] Pass translation domain to the sub-forms when choice list is expanded
* Bug fix: yes
* Tests pass: yes
* Feature addition: no
* BC compatibility break: no
When you have a select list with ``translation_domain``, you loose translations by expanding the list.
---------------------------------------------------------------------------
by stof at 2012-01-21T14:55:31Z
👍
---------------------------------------------------------------------------
by fabpot at 2012-01-21T16:51:17Z
Why not doing that in the 2.0 branch instead?
---------------------------------------------------------------------------
by stof at 2012-01-21T17:26:32Z
@fabpot because the support of translation domains is a 2.1 feature
This commit is contained in:
commit
cbb184c076
@ -63,11 +63,13 @@ class ChoiceType extends AbstractType
|
||||
// The user can check 0 or more checkboxes. If required
|
||||
// is true, he is required to check all of them.
|
||||
'required' => false,
|
||||
'translation_domain' => $options['translation_domain'],
|
||||
));
|
||||
} else {
|
||||
$builder->add((string) $choice, 'radio', array(
|
||||
'value' => $choice,
|
||||
'label' => $value,
|
||||
'translation_domain' => $options['translation_domain'],
|
||||
));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user