Ajout de commentaire sur un sondage nommé.

This commit is contained in:
Antonin 2016-03-05 16:33:42 +01:00
parent 7523294508
commit a42f232196
2 changed files with 2 additions and 3 deletions

View File

@ -52,10 +52,8 @@ $securityService = new SecurityService();
if (!empty($_POST['poll'])) { if (!empty($_POST['poll'])) {
$poll_id = filter_input(INPUT_POST, 'poll', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => POLL_REGEX]]); $poll_id = filter_input(INPUT_POST, 'poll', FILTER_VALIDATE_REGEXP, ['options' => ['regexp' => POLL_REGEX]]);
if (strlen($poll_id) === 16) {
$poll = $pollService->findById($poll_id); $poll = $pollService->findById($poll_id);
} }
}
if (!$poll) { if (!$poll) {
$message = new Message('error', __('Error', 'This poll doesn\'t exist !')); $message = new Message('error', __('Error', 'This poll doesn\'t exist !'));

View File

@ -74,6 +74,7 @@ $(document).ready(function () {
newMessage newMessage
.find('.contents') .find('.contents')
.text(data.message.message); .text(data.message.message);
newMessage.removeClass('hidden');
var commentsAlert = $('#comments_alerts'); var commentsAlert = $('#comments_alerts');
commentsAlert commentsAlert
.empty() .empty()