You are here

function _advpoll_show_cancel_form in Advanced Poll 6.3

Same name and namespace in other branches
  1. 5 advpoll.module \_advpoll_show_cancel_form()
  2. 6 advpoll.module \_advpoll_show_cancel_form()
  3. 6.2 advpoll.module \_advpoll_show_cancel_form()
3 calls to _advpoll_show_cancel_form()
advpoll_view in ./advpoll.module
Implementation of hook_view().
advpoll_view_results in ./advpoll.module
Show results of the vote.
_advpoll_vote_response in ./advpoll.module

File

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

Code

function _advpoll_show_cancel_form($node) {

  // temporary - prevent cancel vote button from displaying if it is flagged to be displayed in a block
  // Need to fix the way AJAX is being implemented.
  $output = '';
  if ($node->voted && !$node->create_view_block && $node->cancel_vote && user_access('cancel own vote') && _advpoll_is_active($node)) {
    $output .= drupal_get_form('advpoll_cancel_form', $node->nid);
  }
  return $output;
}