diff --git a/css/icons.scss b/css/icons.scss index a282308..b3d9748 100644 --- a/css/icons.scss +++ b/css/icons.scss @@ -32,6 +32,7 @@ @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-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 8403afb..37bc163 100644 --- a/lib/Db/Question.php +++ b/lib/Db/Question.php @@ -57,6 +57,7 @@ class Question extends Entity { 'date', 'datetime', 'email', + 'tel', ]; public function __construct() { diff --git a/src/components/Questions/QuestionTel.vue b/src/components/Questions/QuestionTel.vue new file mode 100644 index 0000000..2de594c --- /dev/null +++ b/src/components/Questions/QuestionTel.vue @@ -0,0 +1,37 @@ + + + diff --git a/src/models/AnswerTypes.js b/src/models/AnswerTypes.js index e07ff7c..cda4625 100644 --- a/src/models/AnswerTypes.js +++ b/src/models/AnswerTypes.js @@ -27,6 +27,7 @@ import QuestionLong from '../components/Questions/QuestionLong' import QuestionDate from '../components/Questions/QuestionDate' import QuestionDatetime from '../components/Questions/QuestionDatetime' import QuestionEmail from '../components/Questions/QuestionEmail' +import QuestionTel from '../components/Questions/QuestionTel' /** * @typedef {Object} AnswerTypes @@ -140,4 +141,15 @@ export default { submitPlaceholder: t('forms', 'Enter an email'), warningInvalid: t('forms', 'This question needs a title!'), }, + + tel: { + component: QuestionTel, + icon: 'icon-answer-tel', + label: t('forms', 'Phone number'), + + titlePlaceholder: t('forms', 'Phone number question title'), + createPlaceholder: t('forms', ''), + submitPlaceholder: t('forms', 'Enter a phone number'), + warningInvalid: t('forms', 'This question needs a title!'), + }, }