You are here

function workflow_delete_form in Workflow 5

Same name and namespace in other branches
  1. 5.2 workflow.module \workflow_delete_form()

Create the form for confirmation of deleting a workflow.

Parameters

$wid: The ID of the workflow.

Return value

HTML form.

1 string reference to 'workflow_delete_form'
workflow_menu in ./workflow.module
Implementation of hook_menu().

File

./workflow.module, line 688

Code

function workflow_delete_form($wid, $sid = NULL) {
  if (isset($sid)) {
    return workflow_state_delete_form($wid, $sid);
  }
  $form = array();
  $form['wid'] = array(
    '#type' => 'value',
    '#value' => $wid,
  );
  return confirm_form($form, t('Are you sure you want to delete %title? All nodes that have a workflow state associated with this workflow will have those workflow states removed.', array(
    '%title' => workflow_get_name($wid),
  )), $_GET['destination'] ? $_GET['destination'] : 'admin/build/workflow', t('This action cannot be undone.'), t('Delete'), t('Cancel'));
}