You are here

function backup_migrate_crud_delete_confirm_form in Backup and Migrate 7.3

Same name and namespace in other branches
  1. 8.2 includes/crud.inc \backup_migrate_crud_delete_confirm_form()
  2. 8.3 includes/crud.inc \backup_migrate_crud_delete_confirm_form()
  3. 6.3 includes/crud.inc \backup_migrate_crud_delete_confirm_form()
  4. 6.2 includes/crud.inc \backup_migrate_crud_delete_confirm_form()
  5. 7.2 includes/crud.inc \backup_migrate_crud_delete_confirm_form()

Ask confirmation for deletion of a item.

1 string reference to 'backup_migrate_crud_delete_confirm_form'
backup_migrate_crud_ui_delete in includes/crud.inc
Page callback to delete an item.

File

includes/crud.inc, line 251
CRUD functions for backup and migrate types (schedules, profiles etc.).

Code

function backup_migrate_crud_delete_confirm_form($form, &$form_state, $item) {
  $form['item'] = array(
    '#type' => 'value',
    '#value' => $item,
  );
  if ($item->storage == BACKUP_MIGRATE_STORAGE_OVERRIDEN) {
    $message = $item
      ->revert_confirm_message();
    return confirm_form($form, t('Are you sure?'), $item
      ->get_settings_path(), $message, t('Revert'), t('Cancel'));
  }
  else {
    $message = $item
      ->delete_confirm_message();
    return confirm_form($form, t('Are you sure?'), $item
      ->get_settings_path(), $message, t('Delete'), t('Cancel'));
  }
}