function views_ui_import_page in Views (for Drupal 7) 7.3
Same name and namespace in other branches
- 6.3 includes/admin.inc \views_ui_import_page()
- 6.2 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 - Implements hook_menu().
File
- includes/
admin.inc, line 2091 - 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;
}