function views_ui_edit_display_form
Form constructor callback to edit display of a view.
1 string reference to 'views_ui_edit_display_form'
- views_ui_ajax_forms in includes/
admin.inc - Various subforms for editing the pieces of a view.
File
-
includes/
admin.inc, line 3419
Code
function views_ui_edit_display_form($form, &$form_state) {
$view =& $form_state['view'];
$display_id = $form_state['display_id'];
if (!$view->set_display($display_id)) {
views_ajax_error(t('Invalid display id @display', array(
'@display' => $display_id,
)));
}
$display =& $view->display[$display_id];
// Get form from the handler.
$form['options'] = array(
'#theme_wrappers' => array(
'container',
),
'#attributes' => array(
'class' => array(
'scroll',
),
),
);
$display->handler
->options_form($form['options'], $form_state);
// The handler options form sets $form['#title'], which we need on the entire
// $form instead of just the ['options'] section.
$form['#title'] = $form['options']['#title'];
unset($form['options']['#title']);
// Move the override dropdown out of the scrollable section of the form.
if (isset($form['options']['override'])) {
$form['override'] = $form['options']['override'];
unset($form['options']['override']);
}
$name = NULL;
if (isset($form_state['update_name'])) {
$name = $form_state['update_name'];
}
views_ui_standard_form_buttons($form, $form_state, 'views_ui_edit_display_form', $name);
return $form;
}