You are here

function bat_type_delete_form in Booking and Availability Management Tools for Drupal 7

Form callback: confirmation form for deleting a Type.

Parameters

$type: The Type entity to delete.

See also

confirm_form()

1 string reference to 'bat_type_delete_form'
bat_type_delete_form_wrapper in modules/bat_unit/bat_type.admin.inc
Form callback wrapper: delete a type.

File

modules/bat_unit/bat_type.admin.inc, line 687
BatType editing UI.

Code

function bat_type_delete_form($form, &$form_state, $type) {
  $form_state['bat_type'] = $type;
  $form['#submit'][] = 'bat_type_delete_form_submit';
  $form = confirm_form($form, t('Are you sure you want to delete Type %name?', array(
    '%name' => $type->name,
  )), 'admin/bat/config/types/manage', '<p>' . t('Deleting a type is going to delete the associated units and leave any events referencing those units without a unit reference. Please proceed only if you are sure this is the right thing to do.') . '</p>', t('Delete'), t('Cancel'), 'confirm');
  return $form;
}