Skip to content

Commit f259531

Browse files
committed
Add PasswordType field type
1 parent 98ba90e commit f259531

File tree

5 files changed

+31
-7
lines changed

5 files changed

+31
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "@ditdot-dev/vue-flow-form",
33
"author": "DITDOT",
44
"description": "Create conversational conditional-logic forms with Vue.js.",
5-
"version": "1.0.6",
5+
"version": "1.0.7",
66
"private": false,
77
"repository": {
88
"type": "git",

src/assets/css/common.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ span.faux-form {
225225
.v-form input[type=tel],
226226
.v-form input[type=email],
227227
.v-form input[type=url],
228+
.v-form input[type=password],
228229
.v-form textarea {
229230
-webkit-appearance: none;
230231
-moz-appearance: none;
@@ -257,6 +258,7 @@ span.faux-form {
257258
.v-form .full-width input[type=tel],
258259
.v-form .full-width input[type=email],
259260
.v-form .full-width input[type=url],
261+
.v-form .full-width input[type=password],
260262
.v-form .full-width textarea,
261263
.v-form .full-width span.faux-form{
262264
width: 100%;

src/components/Question.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
import FlowFormLongTextType from './QuestionTypes/LongTextType.vue'
8484
import FlowFormMultipleChoiceType from './QuestionTypes/MultipleChoiceType.vue'
8585
import FlowFormNumberType from './QuestionTypes/NumberType.vue'
86+
import FlowFormPasswordType from './QuestionTypes/PasswordType.vue'
8687
import FlowFormPhoneType from './QuestionTypes/PhoneType.vue'
8788
import FlowFormSectionBreakType from './QuestionTypes/SectionBreakType.vue'
8889
import FlowFormTextType from './QuestionTypes/TextType.vue'
@@ -96,6 +97,7 @@
9697
FlowFormLongTextType,
9798
FlowFormMultipleChoiceType,
9899
FlowFormNumberType,
100+
FlowFormPasswordType,
99101
FlowFormPhoneType,
100102
FlowFormSectionBreakType,
101103
FlowFormTextType,
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<script>
2+
/*
3+
Copyright (c) 2020 - present, DITDOT Ltd. - MIT Licence
4+
https://www.ditdot.hr/en
5+
*/
6+
7+
import TextType from './TextType.vue'
8+
import { QuestionType } from '../../models/QuestionModel'
9+
10+
export default {
11+
extends: TextType,
12+
name: QuestionType.Password,
13+
data() {
14+
return {
15+
inputType: 'password'
16+
}
17+
}
18+
}
19+
</script>

src/models/QuestionModel.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77

88
export const QuestionType = {
99
Dropdown: 'FlowFormDropdownType',
10-
MultipleChoice: 'FlowFormMultipleChoiceType',
11-
Text: 'FlowFormTextType',
12-
LongText: 'FlowFormLongTextType',
1310
Email: 'FlowFormEmailType',
14-
Phone: 'FlowFormPhoneType',
15-
Url: 'FlowFormUrlType',
11+
LongText: 'FlowFormLongTextType',
12+
MultipleChoice: 'FlowFormMultipleChoiceType',
1613
Number: 'FlowFormNumberType',
17-
SectionBreak: 'FlowFormSectionBreakType'
14+
Password: 'FlowFormPasswordType',
15+
Phone: 'FlowFormPhoneType',
16+
SectionBreak: 'FlowFormSectionBreakType',
17+
Text: 'FlowFormTextType',
18+
Url: 'FlowFormUrlType'
1819
}
1920

2021
export const DropdownOptionBlank = {

0 commit comments

Comments
 (0)