function panels_page_context_form in Panels 6.2
Same name and namespace in other branches
- 5.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 639 - panels_page.admin.inc
Code
function panels_page_context_form(&$form_state, $panel_page, $next) {
panels_load_include('plugins');
$form_state['panel_page'] = $panel_page;
$form_state['next'] = $next;
drupal_add_css(panels_get_path('css/panels_admin.css'));
$form['right'] = array(
'#prefix' => '<div class="right-container">',
'#suffix' => '</div>',
);
$form['left'] = array(
'#prefix' => '<div class="left-container">',
'#suffix' => '</div>',
);
panels_load_include('common-context');
panels_load_include('ajax');
$settings = panels_common_add_argument_form('panel_page', $form, $form_state, $form['left']['arguments_table'], $panel_page);
$settings += panels_common_add_context_form('panel_page', $form, $form_state, $form['right']['contexts_table'], $panel_page);
$settings += panels_common_add_relationship_form('panel_page', $form, $form_state, $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;
}