function panels_page_context_form in Panels 5.2
Same name and namespace in other branches
- 6.2 panels_page/panels_page.admin.inc \panels_page_context_form()
The form to edit the context settings of a panel page.
1 string reference to 'panels_page_context_form'
- panels_page_edit_context in panels_page/
panels_page.admin.inc - Edit advanced settings of a panel page.
File
- panels_page/
panels_page.admin.inc, line 597 - panels_page.admin.inc
Code
function panels_page_context_form($panel_page, $next = NULL) {
drupal_add_css(panels_get_path('css/panels_admin.css'));
$layout = panels_get_layout($panel_page->display->layout);
$form['panel_page'] = array(
'#type' => 'value',
'#value' => $panel_page,
);
$form['right'] = array(
'#prefix' => '<div class="right-container">',
'#suffix' => '</div>',
);
$form['left'] = array(
'#prefix' => '<div class="left-container">',
'#suffix' => '</div>',
);
panels_load_include('common');
$settings = panels_common_add_argument_form('panel_page', $form, $form['left']['arguments_table'], $panel_page);
$settings += panels_common_add_context_form('panel_page', $form, $form['right']['contexts_table'], $panel_page);
$settings += panels_common_add_relationship_form('panel_page', $form, $form['left']['relationships_table'], $panel_page);
panels_common_add_context_js($settings);
$label = $next ? t('Save and proceed') : t('Save');
$form['submit'] = array(
'#type' => 'submit',
'#value' => $label,
);
return $form;
}