Skip to content
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

[UserManagementBundle] User form rendered twice when using tabpanes #1142

Merged
merged 3 commits into from
May 2, 2016

Conversation

ro0NL
Copy link
Contributor

@ro0NL ro0NL commented Apr 28, 2016

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets #1141

Had to figure this one out :) the problem is we have 2 instances of FormView, one assigned by default to the template (https://github.com/Kunstmaan/KunstmaanBundlesCMS/blob/master/src/Kunstmaan/UserManagementBundle/Controller/UsersController.php#L197) the other one is generated from TabPane::getFormView when needed. Both track their own "am i rendered" state.

So we have to ignore one based on tabPane being set yes/no, as done with rendering the form itself;
https://github.com/Kunstmaan/KunstmaanBundlesCMS/blob/master/src/Kunstmaan/UserManagementBundle/Resources/views/Users/edit.html.twig#L49

Your welcome :) not sure this is also a low-level problem in e.g. the adminbundle itself... Also noticed the event is only triggered for user edit action, not add :( (ref #628)

@ro0NL
Copy link
Contributor Author

ro0NL commented Apr 29, 2016

Now also fixes rendering of the form start tag 👍

Our 2nd tab form contains a file upload. field The enctype attribute was missing due wrong form view instance, i.e. the one that symfony adds by default if your form contains a file upload field. It's merged into exsisting params, i.e. no BC break here.

@jockri jockri merged commit a22cde1 into Kunstmaan:master May 2, 2016
@jockri jockri added this to the 3.5.2 milestone May 2, 2016
jockri pushed a commit that referenced this pull request May 2, 2016
* master:
  [UserManagementBundle] User form rendered twice when using tabpanes (#1142)
  fix oauth authenticator typehint
  [PagePartBundle] Allow overriding the page part widget for a specific context
  Add messages.nl.yml for google analytics dashboard
@ro0NL ro0NL deleted the bugfix/user-form-tabpane branch May 2, 2016 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants