function 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
Implements hook_menu().

File

includes/admin.inc, line 2104

Code

function views_ui_import_page($form, &$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['bypass_validation'] = array(
        '#type' => 'checkbox',
        '#title' => t('Bypass view validation'),
        '#description' => t('Bypass the validation of plugins and handlers when importing this view.'),
    );
    $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;
}