summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEarl Miles2013-02-01 17:19:15 (GMT)
committer Earl Miles2013-02-01 17:19:15 (GMT)
commitdc64a472c2aafcff463c819ba5db54fec64c0b74 (patch)
tree72549e9363d898da5e9db164330fa32881a92082
parentbe3bac131656cc3156cf6c85ae0f04a517751f21 (diff)
Issue #1649046: Fix double form rendering with all Panels form contexts.
-rw-r--r--panels.module8
1 files changed, 4 insertions, 4 deletions
diff --git a/panels.module b/panels.module
index 795bcd9..5a4fa4e 100644
--- a/panels.module
+++ b/panels.module
@@ -1074,6 +1074,9 @@ function panels_render_display(&$display, $renderer = NULL) {
if (!empty($display->context)) {
if ($form_context = ctools_context_get_form($display->context)) {
$form_context->form['#theme'] = 'panels_render_display_form';
+ if (empty($form_context->form['#theme_wrappers']) || !in_array('form', $form_context->form['#theme_wrappers'])) {
+ $form_context['#theme_wrappers'][] = 'form';
+ }
$form_context->form['#display'] = &$display;
return $form_context->form;
}
@@ -1090,10 +1093,7 @@ function panels_render_display(&$display, $renderer = NULL) {
* then operate as a theme function of the form.
*/
function theme_panels_render_display_form($vars) {
- // @todo this is probably broken in D7
- $render = $vars['element']['#display']->render();
- $vars['element']['#children'] = $render;
- return theme('form', $vars);
+ return $vars['element']['#display']->render();
}
// @layout