From 348aa4642be22b4dc3a0f1c08e8f2530a9e8e122 Mon Sep 17 00:00:00 2001 From: Jonas Rittershofer Date: Thu, 30 Apr 2020 10:58:04 +0200 Subject: [PATCH 1/2] Mandatory option on questions Signed-off-by: Jonas Rittershofer --- src/components/Questions/Question.vue | 62 +++++++++---------- src/components/Questions/QuestionLong.vue | 8 ++- src/components/Questions/QuestionMultiple.vue | 24 +++---- src/components/Questions/QuestionShort.vue | 8 ++- src/mixins/QuestionMixin.js | 53 +++++++++++++++- src/views/Create.vue | 25 ++++++-- src/views/Submit.vue | 23 +++++-- 7 files changed, 142 insertions(+), 61 deletions(-) diff --git a/src/components/Questions/Question.vue b/src/components/Questions/Question.vue index 45d99c6..f4051d9 100644 --- a/src/components/Questions/Question.vue +++ b/src/components/Questions/Question.vue @@ -43,10 +43,13 @@ minlength="1" :maxlength="maxQuestionLength" required - @input="onInput" - @keyup="onTitleChange"> -

+ @input="onTitleChange"> +

+ + {{ t('forms', 'Mandatory') }} + {{ t('forms', 'Delete question') }} @@ -59,14 +62,10 @@ diff --git a/src/components/Questions/QuestionLong.vue b/src/components/Questions/QuestionLong.vue index b0e92ca..24c9c86 100644 --- a/src/components/Questions/QuestionLong.vue +++ b/src/components/Questions/QuestionLong.vue @@ -24,16 +24,18 @@ + @update:text="onTitleChange" + @update:mandatory="onMandatoryChange" + @delete="onDelete">