function views_ui_import_page

3.x admin.inc views_ui_import_page($form, &$form_state)
2.x admin.inc views_ui_import_page(&$form_state)

Import a view from cut & paste.

1 string reference to 'views_ui_import_page'

File

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

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;
}