Ajout de commentaire sur un sondage nommé.
This commit is contained in:
parent
7523294508
commit
a42f232196
@ -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 !'));
|
||||||
|
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user