diff --git a/css/icons.scss b/css/icons.scss index 4aa373b..b3d9748 100644 --- a/css/icons.scss +++ b/css/icons.scss @@ -29,6 +29,10 @@ @include icon-black-white('answer-dropdown', 'forms', 1); @include icon-black-white('answer-short', 'forms', 1); @include icon-black-white('answer-long', 'forms', 1); +@include icon-black-white('answer-date', 'forms', 1); +@include icon-black-white('answer-datetime', 'forms', 1); +@include icon-black-white('answer-email', 'forms', 1); +@include icon-black-white('answer-tel', 'forms', 1); @include icon-black-white('drag-handle', 'forms', 1); .icon-yes { diff --git a/img/answer-date.svg b/img/answer-date.svg new file mode 100644 index 0000000..354bd02 --- /dev/null +++ b/img/answer-date.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/img/answer-datetime.svg b/img/answer-datetime.svg new file mode 100644 index 0000000..6fd29ab --- /dev/null +++ b/img/answer-datetime.svg @@ -0,0 +1,4 @@ + + + + diff --git a/img/answer-email.svg b/img/answer-email.svg new file mode 100644 index 0000000..d41a6d1 --- /dev/null +++ b/img/answer-email.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/img/answer-tel.svg b/img/answer-tel.svg new file mode 100644 index 0000000..8c41b85 --- /dev/null +++ b/img/answer-tel.svg @@ -0,0 +1,3 @@ + + + diff --git a/lib/Db/Question.php b/lib/Db/Question.php index 26549d0..37bc163 100644 --- a/lib/Db/Question.php +++ b/lib/Db/Question.php @@ -53,7 +53,11 @@ class Question extends Entity { 'long', 'multiple', 'multiple_unique', - 'dropdown' + 'dropdown', + 'date', + 'datetime', + 'email', + 'tel', ]; public function __construct() { diff --git a/src/components/Questions/QuestionDate.vue b/src/components/Questions/QuestionDate.vue new file mode 100644 index 0000000..009aebf --- /dev/null +++ b/src/components/Questions/QuestionDate.vue @@ -0,0 +1,37 @@ + + + diff --git a/src/components/Questions/QuestionDatetime.vue b/src/components/Questions/QuestionDatetime.vue new file mode 100644 index 0000000..8a1a3ea --- /dev/null +++ b/src/components/Questions/QuestionDatetime.vue @@ -0,0 +1,87 @@ + + + + + + + diff --git a/src/components/Questions/QuestionEmail.vue b/src/components/Questions/QuestionEmail.vue new file mode 100644 index 0000000..b6658e4 --- /dev/null +++ b/src/components/Questions/QuestionEmail.vue @@ -0,0 +1,37 @@ + + + diff --git a/src/components/Questions/QuestionShort.vue b/src/components/Questions/QuestionShort.vue index 42c2288..468e7ea 100644 --- a/src/components/Questions/QuestionShort.vue +++ b/src/components/Questions/QuestionShort.vue @@ -43,7 +43,7 @@ class="question__input" :maxlength="maxStringLengths.answerText" minlength="1" - type="text" + v-bind:type="type" @input="onInput" @keydown.enter.exact.prevent="onKeydownEnter"> @@ -58,6 +58,12 @@ export default { mixins: [QuestionMixin], + data() { + return { + type: 'text', + } + }, + computed: { submissionInputPlaceholder() { if (this.readOnly) { @@ -72,13 +78,17 @@ export default { const input = this.$refs.input this.$emit('update:values', [input.value]) }, + + getType() { + return 'text' + } }, }