Fix todo comments

Signed-off-by: Jonas Rittershofer <jotoeri@users.noreply.github.com>
This commit is contained in:
Jonas Rittershofer 2020-05-15 14:21:05 +02:00
parent 6a52d83675
commit efafddde0b
4 changed files with 2 additions and 7 deletions

View file

@ -186,20 +186,18 @@ class PageController extends Controller {
// Inject style on all templates
Util::addStyle($this->appName, 'forms');
// TODO: check if already submitted
try {
$form = $this->formMapper->findByHash($hash);
} catch (DoesNotExistException $e) {
return new TemplateResponse('forms', 'notfound');
}
// Does the user have permissions to display
// Does the user have permissions to submit (resp. submitOnce)
if (!$this->formsService->canSubmit($form->getId())) {
return new TemplateResponse('forms', 'nosubmit');
}
// Does the user have permissions to display
// Does the user have access to form
if (!$this->formsService->hasUserAccess($form->getId())) {
return new TemplateResponse('forms', 'notfound');
}

View file

@ -1,6 +1,5 @@
<template>
<li class="question__item">
<!-- TODO: properly choose max length -->
<input
ref="input"
:aria-label="t('forms', 'An answer for the {index} option', { index: index + 1 })"

View file

@ -31,7 +31,6 @@
@update:mandatory="onMandatoryChange"
@delete="onDelete">
<div class="question__content">
<!-- TODO: properly choose max length -->
<textarea ref="textarea"
:aria-label="t('forms', 'A long answer for the question “{text}”', { text })"
:placeholder="t('forms', 'Long answer text')"

View file

@ -31,7 +31,6 @@
@update:mandatory="onMandatoryChange"
@delete="onDelete">
<div class="question__content">
<!-- TODO: properly choose max length -->
<input ref="input"
:aria-label="t('forms', 'A short answer for the question “{text}”', { text })"
:placeholder="t('forms', 'Short answer text')"