Merge pull request #390 from nextcloud/fix/todo_comments
Fix todo comments
This commit is contained in:
commit
6ecb0dc923
|
@ -186,20 +186,18 @@ class PageController extends Controller {
|
||||||
// Inject style on all templates
|
// Inject style on all templates
|
||||||
Util::addStyle($this->appName, 'forms');
|
Util::addStyle($this->appName, 'forms');
|
||||||
|
|
||||||
// TODO: check if already submitted
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$form = $this->formMapper->findByHash($hash);
|
$form = $this->formMapper->findByHash($hash);
|
||||||
} catch (DoesNotExistException $e) {
|
} catch (DoesNotExistException $e) {
|
||||||
return new TemplateResponse('forms', 'notfound');
|
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())) {
|
if (!$this->formsService->canSubmit($form->getId())) {
|
||||||
return new TemplateResponse('forms', 'nosubmit');
|
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())) {
|
if (!$this->formsService->hasUserAccess($form->getId())) {
|
||||||
return new TemplateResponse('forms', 'notfound');
|
return new TemplateResponse('forms', 'notfound');
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<li class="question__item">
|
<li class="question__item">
|
||||||
<!-- TODO: properly choose max length -->
|
|
||||||
<input
|
<input
|
||||||
ref="input"
|
ref="input"
|
||||||
:aria-label="t('forms', 'An answer for the {index} option', { index: index + 1 })"
|
:aria-label="t('forms', 'An answer for the {index} option', { index: index + 1 })"
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
@update:mandatory="onMandatoryChange"
|
@update:mandatory="onMandatoryChange"
|
||||||
@delete="onDelete">
|
@delete="onDelete">
|
||||||
<div class="question__content">
|
<div class="question__content">
|
||||||
<!-- TODO: properly choose max length -->
|
|
||||||
<textarea ref="textarea"
|
<textarea ref="textarea"
|
||||||
:aria-label="t('forms', 'A long answer for the question “{text}”', { text })"
|
:aria-label="t('forms', 'A long answer for the question “{text}”', { text })"
|
||||||
:placeholder="t('forms', 'Long answer text')"
|
:placeholder="t('forms', 'Long answer text')"
|
||||||
|
|
|
@ -31,7 +31,6 @@
|
||||||
@update:mandatory="onMandatoryChange"
|
@update:mandatory="onMandatoryChange"
|
||||||
@delete="onDelete">
|
@delete="onDelete">
|
||||||
<div class="question__content">
|
<div class="question__content">
|
||||||
<!-- TODO: properly choose max length -->
|
|
||||||
<input ref="input"
|
<input ref="input"
|
||||||
:aria-label="t('forms', 'A short answer for the question “{text}”', { text })"
|
:aria-label="t('forms', 'A short answer for the question “{text}”', { text })"
|
||||||
:placeholder="t('forms', 'Short answer text')"
|
:placeholder="t('forms', 'Short answer text')"
|
||||||
|
|
Loading…
Reference in a new issue