-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[TwigBridge] Add row_attr to all form themes #33573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
3d53d98
to
b3e9a65
Compare
src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_horizontal_layout.html.twig
Outdated
Show resolved
Hide resolved
src/Symfony/Bridge/Twig/Resources/views/Form/bootstrap_3_horizontal_layout.html.twig
Outdated
Show resolved
Hide resolved
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 ------- d711ea2 Add missing row_attr option to FormType
b3e9a65
to
310d6bb
Compare
Here is what I did :
|
9146363
to
6ac53d7
Compare
6ac53d7
to
979aef5
Compare
b2c3bfb
to
03cdf96
Compare
03cdf96
to
94b04a8
Compare
What's the status with this PR? :) |
94b04a8
to
dfdcbb4
Compare
Thank you @fancyweb. |
This PR was merged into the 4.3 branch. Discussion ---------- [TwigBridge] Add row_attr to all form themes | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #33552 | License | MIT | Doc PR | - The rules I applied: - Always done on the first HTML tag of the row. - Current existing row attrs (`class` or `style`) are applied unless they are defined by the `row_attr` override. They can be removed if they are explicitly set to `false`. Starting from: ``` <div class="form-group"> ``` With `row_attr: {foo: "bar"}`: ``` <div foo="bar" class="form-group"> ``` With `row_attr: {class: "ccc"}`: ``` <div class="ccc"> ``` With `row_attr: {foo: "bar", class: false}`: ``` <div foo="bar"> ``` Commits ------- dfdcbb4 [TwigBridge] Add row_attr to all form themes
The rules I applied:
class
orstyle
) are applied unless they are defined by therow_attr
override. They can be removed if they are explicitly set tofalse
.Starting from:
With
row_attr: {foo: "bar"}
:With
row_attr: {class: "ccc"}
:With
row_attr: {foo: "bar", class: false}
: