Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/Poll.php
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ public function format(array $format_options = []): array

// Now add it to the poll's contextual theme data.
$this->formatted['choices'][$i] = [
'id' => 'options-' . $i,
'id' => $i,
'number' => ++$choice_number,
'percent' => $bar,
'votes' => $option->votes,
Expand Down
4 changes: 2 additions & 2 deletions Sources/ServerSideIncludes.php
Original file line number Diff line number Diff line change
Expand Up @@ -1875,7 +1875,7 @@ public static function recentPoll(bool $topPollInstead = false, string $output_m

foreach ($return['options'] as $option) {
echo '
<label for="', $option['id'], '">', $option['vote_button'], ' ', $option['option'], '</label><br>';
<label for="options-', $option['id'], '">', $option['vote_button'], ' ', $option['option'], '</label><br>';
}

echo '
Expand Down Expand Up @@ -1966,7 +1966,7 @@ public static function showPoll(?int $topic = null, string $output_method = 'ech

foreach ($return['options'] as $option) {
echo '
<label for="', $option['id'], '">', $option['vote_button'], ' ', $option['option'], '</label><br>';
<label for="options-', $option['id'], '">', $option['vote_button'], ' ', $option['option'], '</label><br>';
}

echo '
Expand Down
2 changes: 1 addition & 1 deletion Themes/default/Display.template.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function template_main()
// Show each option with its button - a radio likely.
foreach (Utils::$context['poll']['options'] as $option) {
echo '
<li>', $option['vote_button'], ' <label for="', $option['id'], '">', $option['option'], '</label></li>';
<li>', $option['vote_button'], ' <label for="options-', $option['id'], '">', $option['option'], '</label></li>';
}

echo '
Expand Down
Loading