function workflow_actions_form in Workflow 5
1 string reference to 'workflow_actions_form'
File
- ./
workflow.module, line 1378
Code
function workflow_actions_form($wid, $tid, $available_options) {
$form['tid'] = array(
'#type' => 'hidden',
'#value' => $tid,
);
$form['#multistep'] = true;
// get and list the actions that are already assigned to this transition
$actions_this_tid = workflow_get_actions($tid);
foreach ($actions_this_tid as $aid => $act_name) {
$form['remove'][$aid] = array(
'#type' => 'item',
'#title' => $act_name,
'#value' => l(t('remove'), "admin/build/workflow/actions/remove/{$wid}/{$tid}/{$aid}"),
);
unset($available_options[md5($aid)]);
}
// list possible actions that may be assigned
if (count($available_options) > 1) {
$form['action'] = array(
'#type' => 'select',
'#options' => $available_options,
);
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('Add'),
);
}
return $form;
}