You are here

function workflow_state_delete_form in Workflow 5

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

Create the form for confirmation of deleting a workflow state.

Parameters

$wid: integer The ID of the workflow.

$sid: The ID of the workflow state.

Return value

HTML form.

1 call to workflow_state_delete_form()
workflow_delete_form in ./workflow.module
Create the form for confirmation of deleting a workflow.
1 string reference to 'workflow_state_delete_form'
workflow_menu in ./workflow.module
Implementation of hook_menu().

File

./workflow.module, line 1222

Code

function workflow_state_delete_form($wid, $sid) {
  $states = workflow_get_states($wid);
  $form = array();
  $form['wid'] = array(
    '#type' => 'value',
    '#value' => $wid,
  );
  $form['sid'] = array(
    '#type' => 'value',
    '#value' => $sid,
  );
  return confirm_form($form, t('Are you sure you want to delete %title (and all its transitions)?', array(
    '%title' => $states[$sid],
  )), $_GET['destination'] ? $_GET['destination'] : 'admin/build/workflow', t('This action cannot be undone.'), t('Delete'), t('Cancel'));
}