You are here

function bat_event_states_delete_event_form in Booking and Availability Management Tools for Drupal 7

Handle the deletion of a single event state.

1 string reference to 'bat_event_states_delete_event_form'
bat_event_menu in modules/bat_event/bat_event.module
Implements hook_menu().

File

modules/bat_event/bat_event.module, line 696
Manage Events - Events store the EventValue of a Unit over a period of time.

Code

function bat_event_states_delete_event_form($form, &$form_state, $event_id) {
  $state_event = bat_event_load_state($event_id);
  if ($state_event === FALSE || $state_event['locked']) {
    return $form;
  }
  $form_state['state_event'] = $event_id;
  $form_state['event_type'] = $state_event['event_type'];
  $form['#submit'][] = 'bat_event_states_delete_event_form_submit';
  $form = confirm_form($form, t('Are you sure you want to delete Event State %state_name ?', array(
    '%state_name' => $state_event['label'],
  )), 'admin/bat/config/events', '<p>' . t('This action cannot be undone.') . '</p>', t('Delete'), t('Cancel'), 'confirm');
  return $form;
}