function nodequeue_remove_action_form in Nodequeue 5.2
Same name and namespace in other branches
- 6.2 nodequeue.module \nodequeue_remove_action_form()
- 7.3 includes/nodequeue.actions.inc \nodequeue_remove_action_form()
- 7.2 includes/nodequeue.actions.inc \nodequeue_remove_action_form()
Configuration form for Remove from Node Queues action.
File
- ./
nodequeue.actions.inc, line 179 - nodequeue.actions.inc Provides actions integration for node queues.
Code
function nodequeue_remove_action_form($context) {
// Default values for form.
if (!isset($edit['qids'])) {
$edit['qids'] = array();
}
$queues = nodequeue_load_queues(nodequeue_get_all_qids(500, TRUE), TRUE);
foreach ($queues as $qid => $queue) {
$options[$qid] = $queue->title;
}
// Add form components.
$form['qids'] = array(
'#type' => 'select',
'#title' => t("Queues"),
'#default_value' => $edit['qids'],
'#multiple' => TRUE,
'#decription' => t('Specify the queues from which the node should be removed. If the queue is a smartqueue, the node shall be removed from all subqueues.'),
'#required' => TRUE,
'#options' => $options,
);
return $form;
}