function views_ui_add_display_form

2.x admin.inc views_ui_add_display_form(&$form_state)

Form to add a display to a view.

2 string references to 'views_ui_add_display_form'
template_preprocess_views_ui_edit_view in includes/admin.inc
Preprocess the view edit page.
views_ui_add_display in includes/admin.inc
AJAX callback to add a display.

File

includes/admin.inc, line 1695
admin.inc Provides the Views' administrative interface.

Code

function views_ui_add_display_form(&$form_state) {
  $view = &$form_state['view'];

  $form['display']['display'] = array(
    '#type' => 'select',
    '#options' => views_fetch_plugin_names('display'),
    '#default_value' => 'page',
  );

  $form['display']['add_display'] = array(
    '#type' => 'submit',
    '#value' => t('Add display'),
    '#submit' => array('views_ui_add_display_form_submit'),
  );

  $form['#id'] = 'views-add-display-form';
  $form['#attributes'] = array('class' => 'views-ajax-form');
  $form['#action'] = url("admin/build/views/nojs/add-display/$view->name");

  return $form;
}