You are here

function workflow_state_add_form_submit in Workflow 5.2

Same name and namespace in other branches
  1. 5 workflow.module \workflow_state_add_form_submit()

File

./workflow.module, line 1213

Code

function workflow_state_add_form_submit($form_id, $form_values) {
  workflow_state_save($form_values);
  if (array_key_exists('sid', $form_values)) {
    drupal_set_message(t('The workflow state was updated.'));
  }
  else {
    watchdog('workflow', t('Created workflow state %name', array(
      '%name' => $form_values['state'],
    )));
    drupal_set_message(t('The workflow state %name was created.', array(
      '%name' => $form_values['state'],
    )));
  }
  return 'admin/build/workflow';
}