You are here

function bat_event_delete_form_submit in Booking and Availability Management Tools for Drupal 7

Submit callback for event_delete_form.

1 string reference to 'bat_event_delete_form_submit'
bat_event_delete_form in modules/bat_event/bat_event.admin.inc
Form callback: confirmation form for deleting a event.

File

modules/bat_event/bat_event.admin.inc, line 576
Unit event editing UI.

Code

function bat_event_delete_form_submit($form, &$form_state) {
  $event = $form_state['bat_event'];
  bat_event_delete($event);
  drupal_set_message(t('The event has been deleted.'));
  watchdog('bat', 'Deleted event %event_id.', array(
    '%event_id' => $event->event_id,
  ));
  $form_state['redirect'] = 'admin/bat/events';
}