You are here

function date_tools_wizard_form_submit in Date 7

Same name and namespace in other branches
  1. 8 date_tools/date_tools.wizard.inc \date_tools_wizard_form_submit()
  2. 6.2 date_tools/date_tools.wizard.inc \date_tools_wizard_form_submit()
  3. 7.3 date_tools/date_tools.wizard.inc \date_tools_wizard_form_submit()
  4. 7.2 date_tools/date_tools.wizard.inc \date_tools_wizard_form_submit()

File

date_tools/date_tools.wizard.inc, line 143

Code

function date_tools_wizard_form_submit(&$form, &$form_state) {
  $view_name = date_tools_wizard_build($form_state['values']);
  menu_rebuild();
  if (!empty($view_name)) {
    drupal_set_message(t('Change the calendar as needed and save the view.'), 'error');
    $form_state['redirect'] = 'admin/structure/views/edit/' . $view_name;
  }
  else {
    $form_state['redirect'] = 'admin/structure/types/manage/' . str_replace('_', '-', $form_state['values']['bundle']) . '/fields';
  }
}