function views_ui_delete_confirm

Page to delete a view.

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

File

includes/admin.inc, line 689

Code

function views_ui_delete_confirm(&$form_state, $view) {
    $form_state['view'] =& $view;
    $form = array();
    $cancel = 'admin/build/views';
    if (!empty($_REQUEST['cancel'])) {
        $cancel = $_REQUEST['cancel'];
    }
    if ($view->type == t('Overridden')) {
        $title = t('Are you sure you want to revert the view %name?', array(
            '%name' => $view->name,
        ));
        $desc = t('Reverting the view will delete the view that is in the database, reverting it to the original default view. Any changes you have made will be lost and cannot be recovered.');
        $button = t('Revert');
    }
    else {
        $title = t('Are you sure you want to delete the view %name?', array(
            '%name' => $view->name,
        ));
        $desc = t('Deleting a view cannot be undone.');
        $button = t('Delete');
    }
    return confirm_form($form, $title, $cancel, $desc, $button, t('Cancel'));
}