You are here

function bootstrap_tour_form_submit in Bootstrap Tour 7.2

Same name and namespace in other branches
  1. 7 bootstrap_tour.module \bootstrap_tour_form_submit()

Implements hook_form_submit().

File

includes/bootstrap_tour.admin.inc, line 102
The file for admin forms and functionality for the bootstrap_tour entity

Code

function bootstrap_tour_form_submit($form, &$form_state) {
  $tour = entity_ui_form_submit_build_entity($form, $form_state);
  $tour->roles = implode(',', $form_state['values']['roles']);
  $tour
    ->save();
  drupal_set_message(t('Bootstrap tour @name has been saved.', array(
    '@name' => $tour->name,
  )));
  $form_state['redirect'] = 'admin/structure/tours';
}