function views_ui_import_page

Same name in other branches
  1. 7.x-3.x includes/admin.inc \views_ui_import_page()

Import a view from cut & paste

1 string reference to 'views_ui_import_page'
views_ui_menu in ./views_ui.module

File

includes/admin.inc, line 787

Code

function views_ui_import_page(&$form_state) {
    $form['name'] = array(
        '#type' => 'textfield',
        '#title' => t('View name'),
        '#description' => t('Enter the name to use for this view if it is different from the source view. Leave blank to use the name of the view.'),
    );
    $form['name_override'] = array(
        '#type' => 'checkbox',
        '#title' => t('Replace an existing view if one exists with the same name'),
    );
    $form['view'] = array(
        '#type' => 'textarea',
        '#title' => t('Paste view code here'),
        '#required' => TRUE,
    );
    $form['submit'] = array(
        '#type' => 'submit',
        '#value' => t('Import'),
        '#submit' => array(
            'views_ui_import_submit',
        ),
        '#validate' => array(
            'views_ui_import_validate',
        ),
    );
    return $form;
}