-
Notifications
You must be signed in to change notification settings - Fork 1
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
Replace SubFormElement with FieldsetElement #74
Conversation
@TAINCER Please rewrite the tests to verify that the array notation works both in terms of rendering and value processing. Also make sure that it is still possible to get elements with their original names. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't expect any more changes than the ones just requested, so after that please squash ll your commits belonging to tests/FormElement/FieldsetTest.php
into one "Test Fieldset" commit.
832c75b
to
91a5932
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's because cloning just doesn't work. But that's not something that this PR introduces. |
Or did you spot something wrong here in the code @yhabteab? |
I would say yes :) Instead of doing so, why couldn't the concrete form set the default decorator of the element? ipl-html/src/FormElement/FieldsetElement.php Lines 60 to 71 in 91a5932
So, I've just removed the $crontab>setDefaultElementDecorator(new IcingaFormDecorator()); |
Its not about adding the decorator multiple times or not, but with my version we wouldn't have to clone things as we are instantiating our own decorator instance.
|
The whole point is that I don't want library users to have to set decorators for fieldsets if the form already provides a decorator. Can you please try the latest commit with the cloning patch applied? |
acade1f
to
b2b413b
Compare
@TAINCER Please rebase. |
Wait before merging please. I think some commits can be squashed. |
FieldsetElement supports array notation.
Co-authored-by: Eric Lippmann <[email protected]>
Other elements also need access to it.
The hidden element of the checkbox must also have the name from the attribute name callback.
Ready. |
No description provided.