var pollOptionNum = 0; var pollOptionId = ', $context['last_choice_id'], '; function addPollOption() { if (pollOptionNum == 0) { for (var i = 0; i < document.forms.postmodify.elements.length; i++) if (document.forms.postmodify.elements[i].id.substr(0, 8) == "options-") pollOptionNum++; } pollOptionNum++ pollOptionId++ setOuterHTML(document.getElementById("pollMoreOptions"), \'
:

'; if (!empty($context['poll_error']['messages'])) echo '

', $context['is_edit'] ? $txt['error_while_editing_poll'] : $txt['error_while_adding_poll'], ':
', empty($context['poll_error']['messages']) ? '' : implode('
', $context['poll_error']['messages']), '
'; // Start the main poll form. echo '

', $context['page_title'], '

'; echo '
', $txt['poll_question'], ':
', $txt['poll_question'], ':
'; foreach ($context['choices'] as $choice) { echo '
:
'; // Does this option have a vote count yet, or is it new? if ($choice['votes'] != -1) echo ' (', $choice['votes'], ' ', $txt['votes'], ')'; echo '
'; } echo '

(', $txt['poll_add_option'], ')
', $txt['poll_options'], ':
'; if ($context['can_moderate_poll']) { echo '

', $txt['poll_run_limit'], '
', $txt['days_word'], '
'; if ($context['poll']['guest_vote_allowed']) echo '
'; } echo '
', $txt['poll_results_visibility'], ':


'; // If this is an edit, we can allow them to reset the vote counts. if ($context['is_edit']) echo '
', $txt['reset_votes'], ' ' . $txt['reset_votes_check'] . '
'; echo '
'; } ?>