You are here

function workflow_extensions_form_submit in Workflow Extensions 7

Same name and namespace in other branches
  1. 6 workflow_extensions.module \workflow_extensions_form_submit()

Handler for the edit form.

2 string references to 'workflow_extensions_form_submit'
workflow_extensions_form_alter in ./workflow_extensions.module
Implements hook_form_alter().
_workflow_extensions_assign_handlers in ./workflow_extensions.module
Sets up an array of handlers appropriate for the form we're on.

File

./workflow_extensions.module, line 308
UI-related improvements to the Workflow module and tokens for Rules.

Code

function workflow_extensions_form_submit($form, &$form_state) {

  // In the original form_submit handler that we pass control to next, the
  // selected workflow state is taken from form_state['values']['workflow']. So
  // that's the entry we need to set here in accordance with the clicked button.
  // See workflow_tab_form_submit() for the Workflow tab.
  if (isset($form_state['clicked_button']['#to_state'])) {
    $form_state['values']['workflow'] = $form_state['clicked_button']['#to_state'];
  }

  // workflow_tab_form_submit() requires the node to be present on $form_state.
  if (isset($form['#node'])) {
    $form_state['values']['node'] = $form['#node'];
  }

  // [#1786346]
  form_load_include($form_state, 'inc', 'workflow', 'workflow.pages');
}