Skip to content
Snippets Groups Projects
Commit 8cd5210f authored by Dries Buytaert's avatar Dries Buytaert
Browse files

- Patch #51561 by dww: fixed broken HTML.

parent 9a65cabf
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -380,14 +380,11 @@ function theme_poll_results($title, $results, $votes, $links, $block, $nid, $vot ...@@ -380,14 +380,11 @@ function theme_poll_results($title, $results, $votes, $links, $block, $nid, $vot
$output .= '<div class="poll">'; $output .= '<div class="poll">';
$output .= $results; $output .= $results;
$output .= '<div class="total">'. t('Total votes: %votes', array('%votes' => $votes)) .'</div>'; $output .= '<div class="total">'. t('Total votes: %votes', array('%votes' => $votes)) .'</div>';
if (isset($vote) && $vote > -1) { if (isset($vote) && $vote > -1 && user_access('cancel own vote')) {
if (user_access('cancel own vote')) { $form['#action'] = url("poll/cancel/$nid");
$form['#action'] = url("poll/cancel/$nid"); $form['choice'] = array('#type' => 'hidden', '#value' => $vote);
$form['choice'] = array('#type' => 'hidden', '#value' => $vote); $form['submit'] = array('#type' => 'submit', '#value' => t('Cancel your vote'));
$form['submit'] = array('#type' => 'submit', '#value' => t('Cancel your vote')); $output .= drupal_get_form('poll_cancel_form', $form);
$output .= drupal_get_form('poll_cancel_form', $form);
}
$output .= '</div>';
} }
$output .= '</div>'; $output .= '</div>';
} }
......
...@@ -380,14 +380,11 @@ function theme_poll_results($title, $results, $votes, $links, $block, $nid, $vot ...@@ -380,14 +380,11 @@ function theme_poll_results($title, $results, $votes, $links, $block, $nid, $vot
$output .= '<div class="poll">'; $output .= '<div class="poll">';
$output .= $results; $output .= $results;
$output .= '<div class="total">'. t('Total votes: %votes', array('%votes' => $votes)) .'</div>'; $output .= '<div class="total">'. t('Total votes: %votes', array('%votes' => $votes)) .'</div>';
if (isset($vote) && $vote > -1) { if (isset($vote) && $vote > -1 && user_access('cancel own vote')) {
if (user_access('cancel own vote')) { $form['#action'] = url("poll/cancel/$nid");
$form['#action'] = url("poll/cancel/$nid"); $form['choice'] = array('#type' => 'hidden', '#value' => $vote);
$form['choice'] = array('#type' => 'hidden', '#value' => $vote); $form['submit'] = array('#type' => 'submit', '#value' => t('Cancel your vote'));
$form['submit'] = array('#type' => 'submit', '#value' => t('Cancel your vote')); $output .= drupal_get_form('poll_cancel_form', $form);
$output .= drupal_get_form('poll_cancel_form', $form);
}
$output .= '</div>';
} }
$output .= '</div>'; $output .= '</div>';
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment