This commit is contained in:
Roman Kelesidis 2023-12-21 00:33:48 +07:00
parent 4fcea9b1af
commit 5d4d3ebd3f
2 changed files with 4 additions and 3 deletions

View File

@ -126,10 +126,10 @@ function html2text (str)
<table id="poll-results-block" class="borderless bCenter"></table>
<table id="poll-votes-block" class="borderless bCenter"></table>
<!-- IF SHOW_VOTE_BTN -->
<!-- IF not POLL_ALREADY_VOTED && SHOW_VOTE_BTN -->
<div id="vote-btn-a" class="mrg_8 tCenter">[ <a href="#" onclick="build_votes(); return false;" class="gen"><b>{L_SUBMIT_VOTE}</b></a> ]</div>
<div id="vote-btn-input" class="mrg_6 tCenter" style="display: none;"><input type="button" onclick="submit_vote(); return false;" value="{L_SUBMIT_VOTE}" class="bold" /></div>
<!-- ELSE -->
<!-- ELSEIF not SHOW_VOTE_BTN -->
<div class="mrg_8 tCenter">[ <b>{L_NEW_POLL_END}</b> ]</div>
<!-- ENDIF -->
@ -147,4 +147,4 @@ function html2text (str)
<!-- ENDIF -->
<!-- ENDIF -->
</div>
<!-- ENDIF -->
<!-- ENDIF -->

View File

@ -644,6 +644,7 @@ if ($topic_has_poll)
{
$template->assign_vars(array(
'SHOW_VOTE_BTN' => poll_is_active($t_data),
'POLL_ALREADY_VOTED' => (bool) DB()->fetch_row("SELECT 1 FROM ". BB_POLL_USERS ." WHERE topic_id = $topic_id AND user_id = {$userdata['user_id']} LIMIT 1"),
'POLL_VOTES_JS' => $poll_votes_js,
));
}