bug #33688 Add missing row_attr option to FormType (mcsky)
This PR was merged into the 4.3 branch.
Discussion
----------
Add missing row_attr option to FormType
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fix: #33682 - related issue #33573
| License | MIT
The #33573 modified Symfony's form themes. But the [FormType](https://github.com/symfony/form/blob/master/Extension/Core/Type/FormType.php) don't allow the option `row_attr` so the OptionResolver throw an exception that the option is unknown.
This PR basically add the option and give it to the form view (like `label_attr` do)
Commits
-------
d711ea2b54
Add missing row_attr option to FormType
This commit is contained in:
commit
479d8ee2a3
@ -101,6 +101,7 @@ abstract class BaseType extends AbstractType
|
|||||||
'attr' => $options['attr'],
|
'attr' => $options['attr'],
|
||||||
'block_prefixes' => $blockPrefixes,
|
'block_prefixes' => $blockPrefixes,
|
||||||
'unique_block_prefix' => $uniqueBlockPrefix,
|
'unique_block_prefix' => $uniqueBlockPrefix,
|
||||||
|
'row_attr' => $options['row_attr'],
|
||||||
'translation_domain' => $translationDomain,
|
'translation_domain' => $translationDomain,
|
||||||
'label_translation_parameters' => $labelTranslationParameters,
|
'label_translation_parameters' => $labelTranslationParameters,
|
||||||
'attr_translation_parameters' => $attrTranslationParameters,
|
'attr_translation_parameters' => $attrTranslationParameters,
|
||||||
@ -125,6 +126,7 @@ abstract class BaseType extends AbstractType
|
|||||||
'disabled' => false,
|
'disabled' => false,
|
||||||
'label' => null,
|
'label' => null,
|
||||||
'label_format' => null,
|
'label_format' => null,
|
||||||
|
'row_attr' => [],
|
||||||
'label_translation_parameters' => [],
|
'label_translation_parameters' => [],
|
||||||
'attr_translation_parameters' => [],
|
'attr_translation_parameters' => [],
|
||||||
'attr' => [],
|
'attr' => [],
|
||||||
@ -134,5 +136,6 @@ abstract class BaseType extends AbstractType
|
|||||||
|
|
||||||
$resolver->setAllowedTypes('block_prefix', ['null', 'string']);
|
$resolver->setAllowedTypes('block_prefix', ['null', 'string']);
|
||||||
$resolver->setAllowedTypes('attr', 'array');
|
$resolver->setAllowedTypes('attr', 'array');
|
||||||
|
$resolver->setAllowedTypes('row_attr', 'array');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
"post_max_size_message",
|
"post_max_size_message",
|
||||||
"property_path",
|
"property_path",
|
||||||
"required",
|
"required",
|
||||||
|
"row_attr",
|
||||||
"translation_domain",
|
"translation_domain",
|
||||||
"upload_max_size_message"
|
"upload_max_size_message"
|
||||||
]
|
]
|
||||||
|
@ -31,6 +31,7 @@ Symfony\Component\Form\Extension\Core\Type\ChoiceType (Block prefix: "choice")
|
|||||||
post_max_size_message
|
post_max_size_message
|
||||||
property_path
|
property_path
|
||||||
required
|
required
|
||||||
|
row_attr
|
||||||
translation_domain
|
translation_domain
|
||||||
upload_max_size_message
|
upload_max_size_message
|
||||||
--------------------------- -------------------- ------------------------------ -----------------------
|
--------------------------- -------------------- ------------------------------ -----------------------
|
||||||
|
@ -31,6 +31,7 @@
|
|||||||
"post_max_size_message",
|
"post_max_size_message",
|
||||||
"property_path",
|
"property_path",
|
||||||
"required",
|
"required",
|
||||||
|
"row_attr",
|
||||||
"translation_domain",
|
"translation_domain",
|
||||||
"trim",
|
"trim",
|
||||||
"upload_max_size_message"
|
"upload_max_size_message"
|
||||||
|
@ -33,6 +33,7 @@ Symfony\Component\Form\Extension\Core\Type\FormType (Block prefix: "form")
|
|||||||
post_max_size_message
|
post_max_size_message
|
||||||
property_path
|
property_path
|
||||||
required
|
required
|
||||||
|
row_attr
|
||||||
translation_domain
|
translation_domain
|
||||||
trim
|
trim
|
||||||
upload_max_size_message
|
upload_max_size_message
|
||||||
|
Reference in New Issue
Block a user