Update survey.js and set description correctly
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
parent
bbf8f76fc6
commit
dfa192ab41
11
js/survey.jquery.min.js
vendored
11
js/survey.jquery.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -39,7 +39,8 @@ $(document).ready(function () {
|
||||||
questions = JSON.parse(questionJSON)
|
questions = JSON.parse(questionJSON)
|
||||||
|
|
||||||
var surveyJSON = {
|
var surveyJSON = {
|
||||||
title: form.title + ': ' + form.description,
|
title: form.title,
|
||||||
|
description: form.description,
|
||||||
questions: []
|
questions: []
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -56,4 +57,4 @@ $(document).ready(function () {
|
||||||
onUpdateQuestionCssClasses: cssUpdate,
|
onUpdateQuestionCssClasses: cssUpdate,
|
||||||
onComplete: sendDataToServer,
|
onComplete: sendDataToServer,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
@ -285,17 +285,21 @@ class PageController extends Controller {
|
||||||
|
|
||||||
if ($this->hasUserAccess($form)) {
|
if ($this->hasUserAccess($form)) {
|
||||||
$renderAs = $this->userId !== null ? 'user' : 'public';
|
$renderAs = $this->userId !== null ? 'user' : 'public';
|
||||||
return new TemplateResponse('forms', 'vote.tmpl', [
|
$res = new TemplateResponse('forms', 'vote.tmpl', [
|
||||||
'form' => $form,
|
'form' => $form,
|
||||||
'questions' => $this->getQuestions($form->getId()),
|
'questions' => $this->getQuestions($form->getId()),
|
||||||
'votes' => $votes,
|
'votes' => $votes,
|
||||||
'participant' => $participants,
|
'participant' => $participants,
|
||||||
'notification' => $notification,
|
'notification' => $notification,
|
||||||
'userId' => $this->userId,
|
'userId' => $this->userId,
|
||||||
'userMgr' => $this->userMgr,
|
'userMgr' => $this->userMgr,
|
||||||
'urlGenerator' => $this->urlGenerator,
|
'urlGenerator' => $this->urlGenerator,
|
||||||
'avatarManager' => $this->avatarManager
|
'avatarManager' => $this->avatarManager
|
||||||
], $renderAs);
|
], $renderAs);
|
||||||
|
$csp = new ContentSecurityPolicy();
|
||||||
|
$csp->allowEvalScript(true);
|
||||||
|
$res->setContentSecurityPolicy($csp);
|
||||||
|
return $res;
|
||||||
} else {
|
} else {
|
||||||
User::checkLoggedIn();
|
User::checkLoggedIn();
|
||||||
return new TemplateResponse('forms', 'no.acc.tmpl', []);
|
return new TemplateResponse('forms', 'no.acc.tmpl', []);
|
||||||
|
|
Loading…
Reference in a new issue