You are here

function smartqueue_author_nodequeue_form in Nodequeue 5.2

Implementation of hook_nodequeue()

File

./authorqueue.module, line 16

Code

function smartqueue_author_nodequeue_form($queue, &$form) {
  $roles = user_roles(TRUE);
  $form['placeholder']['rids'] = array(
    '#type' => 'checkboxes',
    '#title' => t('Roles'),
    '#description' => t('Select which roles a user must have to create a queue. If none are checked, all node authors will get a queue.'),
    '#options' => $roles,
  );
  $form['subqueue_title'] = array(
    '#type' => 'textfield',
    '#title' => t('Subqueue title'),
    '#default_value' => $queue->subqueue_title,
    '#size' => 50,
    '#maxlength' => 64,
    '#description' => t('What to display for the subqueue title; use %subqueue to embed the actual subqueue title. This is used to distinguish multiple nodequeues with subqueues from each other, as internal subqueue title is filled automatically.'),
  );
  if ($queue->qid && !empty($queue->reference)) {
    $form['placeholder']['rids']['#default_value'] = explode('-', $queue->reference);
  }
}