You are here

function queue_ui_release_item_form in Queue UI 7.2

Releases an item from its queue by setting expiry to zero).

See also

queue_ui_release_item_submit()

1 string reference to 'queue_ui_release_item_form'
queue_ui_menu in ./queue_ui.module
Implements hook_menu().

File

./queue_ui.forms.inc, line 28

Code

function queue_ui_release_item_form($form, $form_state, $queue_name, $queue_item) {
  if ($queue = _queue_ui_queueclass($queue_name)) {
    return confirm_form(array(
      'queue_item' => array(
        '#type' => 'value',
        '#value' => array(
          'queue_name' => $queue_name,
          'itemid' => $queue_item,
        ),
      ),
    ), t('Are you sure you want to remove leases from queue item %queue_item?', array(
      '%queue_item' => $queue_item,
    )), QUEUE_UI_BASE . "/inspect/{$queue_name}", t('This action cannot be undone and will force the removal of leases from the item even if it is currently being processed.'), t('Remove lease'), t('Cancel'));
  }

  // @TODO - if not implemented display an error.
}