You are here

function bat_unit_delete_form in Booking and Availability Management Tools for Drupal 7

Form callback: confirmation form for deleting a unit.

Parameters

BatUnit $unit: The unit to delete.

See also

confirm_form()

1 string reference to 'bat_unit_delete_form'
bat_unit_delete_form_wrapper in modules/bat_unit/bat_unit.admin.inc
Form callback wrapper: delete a unit.

File

modules/bat_unit/bat_unit.admin.inc, line 405
BatUnit editing UI.

Code

function bat_unit_delete_form($form, &$form_state, BatUnit $unit) {
  $form_state['bat_unit'] = $unit;
  $form['#submit'][] = 'bat_unit_delete_form_submit';
  $form = confirm_form($form, t('Are you sure you want to delete Unit %name?', array(
    '%name' => $unit->name,
  )), 'admin/bat/config/units/unit', '<p>' . t('This action cannot be undone.') . '</p>', t('Delete'), t('Cancel'), 'confirm');
  return $form;
}