You are here

function node_recur_node_form_submit in Node recur 7

Submit handler for the node recur form on the node form

1 string reference to 'node_recur_node_form_submit'
node_recur_form_alter in ./node_recur.module
Implements hook_form_alter().

File

./node_recur.module, line 587

Code

function node_recur_node_form_submit(&$form, &$form_state) {
  module_load_include('inc', 'node_recur', 'node_recur.pages');

  // If option is set to nothing, then end here
  if ($form_state['values']['option'] == 'none') {
    return;
  }

  // Extract the node
  $node = $form_state['node'];

  // Generate dates
  $dates = node_recur_generate_dates_from_form($node, $form_state);

  // Store the dates
  $form['#start_dates'] = $dates['start'];
  $form['#end_dates'] = $dates['end'];

  // Store the node
  $form['#node'] = $node;

  // Use the normal submit handler
  node_recur_node_recur_confirm_submit($form, $form_state);
}