You are here

function nodequeue_workflow_ng_action_load_nodequeue_form in Nodequeue 5.2

File

./nodequeue.workflow_ng.inc, line 100
nodequeue_workflow_ng.inc

Code

function nodequeue_workflow_ng_action_load_nodequeue_form($settings = array(), $argument_info) {

  //Get existing nodequeues.
  $options = _nodequeue_workflow_ng_action_get_nodequeue();
  if ($options) {
    $description = t('Specify the queue into which the node should be submitted. If the queue is a smartqueue, the node shall be placed into every subqueue for which it is eligible.');
  }
  else {
    $description = t('There are no existing queues. Create a nodequeue manually through the !url or using a workflow_ng action.', array(
      '!url' => l('settings', 'admin/content/nodequeue'),
    ));
  }
  $form = array();
  $form['nodequeue_list'] = array(
    '#type' => 'select',
    '#title' => t('Select nodequeue'),
    '#description' => $description,
    '#options' => $options,
    '#default_value' => $settings['nodequeue_list'],
    '#disabled' => empty($options),
  );
  $form['nodequeue_token'] = array(
    '#type' => 'textfield',
    '#title' => t('Nodequeue id'),
    '#description' => t('Enter the queue id (qid) of the nodequeue into which the node should be submitted, or leave blank if you have selected one from the list above.'),
    '#default_value' => $settings['nodequeue_token'],
  );
  workflow_ng_token_replacement_help($form, $argument_info);
  return $form;
}