function views_ui_add_display_form

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 1830

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', NULL, array(
            $view->base_table,
        )),
        '#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;
}