You are here

function bat_unit_form_submit_delete in Booking and Availability Management Tools for Drupal 7

Form API submit callback for the delete button.

1 string reference to 'bat_unit_form_submit_delete'
bat_unit_edit_form in modules/bat_unit/bat_unit.admin.inc
Form callback: create or edit a unit.

File

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

Code

function bat_unit_form_submit_delete(&$form, &$form_state) {
  $destination = array();
  if (isset($_GET['destination'])) {
    $destination = drupal_get_destination();
    unset($_GET['destination']);
  }
  $form_state['redirect'] = array(
    'admin/bat/config/units/unit/' . $form_state['bat_unit']->unit_id . '/delete',
    array(
      'query' => $destination,
    ),
  );
}