Question-specific title-placeholders

Signed-off-by: Jonas Rittershofer <jotoeri@users.noreply.github.com>
This commit is contained in:
Jonas Rittershofer 2020-05-14 20:56:22 +02:00
commit 9184cb4480
8 changed files with 16 additions and 5 deletions

View file

@ -35,7 +35,7 @@
<!-- Header -->
<div class="question__header">
<input v-if="edit || !text"
:placeholder="t('forms', 'Question title')"
:placeholder="titlePlaceholder"
:aria-label="t('forms', 'Title of question number {index}', {index})"
:value="text"
class="question__header-title"
@ -89,6 +89,10 @@ export default {
type: String,
required: true,
},
titlePlaceholder: {
type: String,
required: true,
},
mandatory: {
type: Boolean,
required: true,

View file

@ -27,6 +27,7 @@
:mandatory="mandatory"
:edit.sync="edit"
:max-question-length="maxStringLengths.questionText"
:title-placeholder="answerType.titlePlaceholder"
@update:text="onTitleChange"
@update:mandatory="onMandatoryChange"
@delete="onDelete">

View file

@ -27,6 +27,7 @@
:mandatory="mandatory"
:edit.sync="edit"
:max-question-length="maxStringLengths.questionText"
:title-placeholder="answerType.titlePlaceholder"
@update:text="onTitleChange"
@update:mandatory="onMandatoryChange"
@delete="onDelete">
@ -104,7 +105,7 @@ export default {
},
isUnique() {
return this.model.unique === true
return this.answerType.unique === true
},
hasNoAnswer() {

View file

@ -27,6 +27,7 @@
:mandatory="mandatory"
:edit.sync="edit"
:max-question-length="maxStringLengths.questionText"
:title-placeholder="answerType.titlePlaceholder"
@update:text="onTitleChange"
@update:mandatory="onMandatoryChange"
@delete="onDelete">