function panels_node_context_form in Panels 5.2
The form to edit the context settings of a panel node.
1 string reference to 'panels_node_context_form'
- panels_node_context_edit in panels_node/
panels_node.module - Edit contexts of a panel node.
File
- panels_node/
panels_node.module, line 420 - panels_node.module
Code
function panels_node_context_form($panel_node) {
drupal_add_css(panels_get_path('css/panels_admin.css'));
$form['panel_node'] = array(
'#type' => 'value',
'#value' => $panel_node,
);
$form['right'] = array(
'#prefix' => '<div class="right-container">',
'#suffix' => '</div>',
);
$form['left'] = array(
'#prefix' => '<div class="left-container">',
'#suffix' => '</div>',
);
panels_load_include('common');
// FIXME: Common panels forms are based on $object->name instead of did.
$panel_node->name = $panel_node->did;
$settings = panels_common_add_context_form('panel_node', $form, $form['right']['contexts_table'], $panel_node);
$settings += panels_common_add_relationship_form('panel_node', $form, $form['left']['relationships_table'], $panel_node);
panels_common_add_context_js($settings);
$label = t('Save');
$form['submit'] = array(
'#type' => 'submit',
'#value' => $label,
);
return $form;
}