You are here

function advpoll_reset_confirm in Advanced Poll 5

Callback to display a reset votes confirmation form.

1 string reference to 'advpoll_reset_confirm'
advpoll_menu in ./advpoll.module
Implementation of hook_menu().

File

./advpoll.module, line 1223
Advanced Poll - a sophisticated polling module for voting, elections, and group decision-making.

Code

function advpoll_reset_confirm() {
  global $form_values;
  $edit = $form_values['edit'];
  $edit['nid'] = $edit['nid'] ? $edit['nid'] : arg(1);
  $node = node_load($edit['nid']);
  $form['nid'] = array(
    '#type' => 'value',
    '#value' => $node->nid,
  );
  $output = confirm_form($form, t('Are you sure you want to reset the votes for %title?', array(
    '%title' => $node->title,
  )), 'node/' . $node->nid, t('This action cannot be undone.'), t('Reset votes'), t('Cancel'));
  return $output;
}