From efafddde0b4d874fb38efea51783b046b10ec708 Mon Sep 17 00:00:00 2001 From: Jonas Rittershofer Date: Fri, 15 May 2020 14:21:05 +0200 Subject: [PATCH] Fix todo comments Signed-off-by: Jonas Rittershofer --- lib/Controller/PageController.php | 6 ++---- src/components/Questions/AnswerInput.vue | 1 - src/components/Questions/QuestionLong.vue | 1 - src/components/Questions/QuestionShort.vue | 1 - 4 files changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/Controller/PageController.php b/lib/Controller/PageController.php index d4a1f58..2eaeb30 100644 --- a/lib/Controller/PageController.php +++ b/lib/Controller/PageController.php @@ -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'); } diff --git a/src/components/Questions/AnswerInput.vue b/src/components/Questions/AnswerInput.vue index 6e28b9c..1652ea4 100644 --- a/src/components/Questions/AnswerInput.vue +++ b/src/components/Questions/AnswerInput.vue @@ -1,6 +1,5 @@