1 views_ui.admin.inc | views_ui_break_lock_confirm($form, &$form_state, $view) |
Page to delete a view.
File
- core/
modules/ views_ui/ views_ui.admin.inc, line 903 - Admin page callbacks for the Views UI module.
Code
function views_ui_break_lock_confirm($form, &$form_state, $view) {
$form_state['view'] = &$view;
$form = array();
if (empty($view->locked)) {
$form['message']['#markup'] = t('There is no lock on view %name to break.', array('%name' => $view->name));
return $form;
}
$cancel = 'admin/structure/views/view/' . $view->name . '/configure';
$account = user_load($view->locked->uid);
return confirm_form($form,
t('Are you sure you want to break the lock on view %name?',
array('%name' => $view->name)),
$cancel,
t('By breaking this lock, any unsaved changes made by !user will be lost!', array('!user' => theme('username', array('account' => $account)))),
t('Break lock'),
t('Cancel'));
}