mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-16 23:00:51 +03:00
fix poll
This commit is contained in:
parent
c41fdfc0e8
commit
c3f11f1ce7
|
@ -183,6 +183,13 @@ class ActionAjax extends Action {
|
|||
if (count($aAnswerItems)!=count($aAnswerIds)) {
|
||||
return $this->EventErrorDebug();
|
||||
}
|
||||
/**
|
||||
* Ограничение на максимальное число ответов
|
||||
*/
|
||||
if (count($aAnswerIds)>$oPoll->getCountAnswerMax()) {
|
||||
$this->Message_AddErrorSingle('Максимум можно выбрать вариантов: '.$oPoll->getCountAnswerMax());
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<h3 class="poll-title">{$oPoll->getTitle()}</h3>
|
||||
|
||||
{if ! $oPoll->getVoteCurrent()}
|
||||
<form action="" method="post" class="js-poll-vote-form">
|
||||
<form action="" method="post" class="js-poll-vote-form" onsubmit="return false;">
|
||||
<ul class="poll-answer-list">
|
||||
{foreach $oPoll->getAnswers() as $oAnswer}
|
||||
<li class="poll-answer-list-item js-poll-answer-list-item" data-answer-id="{$oAnswer->getId()}">
|
||||
|
|
Loading…
Reference in a new issue