You are here

function workflow_add_form_submit in Workflow 5.2

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

File

./workflow.module, line 897

Code

function workflow_add_form_submit($form_id, $form_values) {
  $workflow_name = $form_values['wf_name'];
  if (array_key_exists('wf_name', $form_values) && $workflow_name != '') {
    workflow_create($workflow_name);
    watchdog('workflow', t('Created workflow %name', array(
      '%name' => $workflow_name,
    )));
    drupal_set_message(t('The workflow %name was created. You should now add states to your workflow.', array(
      '%name' => $workflow_name,
    )), 'warning');
    return 'admin/build/workflow';
  }
}