You are here

function bootstrap_tour_toggle_status in Bootstrap Tour 7

Submit callback for the delete confirmation form. Actually performs the delete.

1 string reference to 'bootstrap_tour_toggle_status'
bootstrap_tour_menu in ./bootstrap_tour.module
Implementation of hook_menu()

File

./bootstrap_tour.module, line 229

Code

function bootstrap_tour_toggle_status($tour) {
  if (empty($tour->disabled)) {
    drupal_set_message(t('The ') . $tour->title . t(' tour has been disabled.'));
    $disable = TRUE;
  }
  else {
    drupal_set_message(t('The ') . $tour->title . t(' tour has been enabled.'));
    $disable = FALSE;
  }
  ctools_export_crud_set_status('bootstrap_tour', $tour, $disable);
  drupal_goto('admin/structure/tours');
}