1
1
<template >
2
2
<div >
3
3
<h3 class =" title has-text-centered has-text-dark" >
4
- {{ title }}
4
+ {{ $t('provider.linkPasswordProvider.passwordForm. title') }}
5
5
</h3 >
6
+ <p class =" has-text-centered has-margin-bottom-15" >
7
+ {{ email ?
8
+ $t('provider.linkPasswordProvider.passwordForm.description',{email}) :
9
+ $t('provider.linkPasswordProvider.passwordForm.descriptionNoEmail') }}
10
+ </p >
6
11
<div class =" box" >
7
- <template v-if =" description " >
8
- <p >{{ description }}</p >
9
- <br >
10
- </template >
12
+
11
13
<ValidationObserver v-slot =" { passes }" tag =" form" >
14
+ <FieldWithValue
15
+ v-if =" !!email"
16
+ :value =" email"
17
+ :label =" $t('common.field.email')"
18
+ :disabled =" true"
19
+ label-position =" on-border"
20
+ class =" has-margin-bottom-15"
21
+ />
22
+
12
23
<InputWithValidation
24
+ v-else
13
25
v-model =" credentials.email"
14
26
:label =" $t('common.field.email')"
15
27
:placeholder =" $t('common.field.emailPlaceholder')"
16
28
input-type =" email"
17
29
rules =" required|email"
18
30
vid =" email"
19
- :disabled =" !!credentials.email"
20
31
label-position =" on-border"
21
32
class =" has-margin-5"
22
33
/>
44
55
/>
45
56
46
57
<div class =" buttons" >
47
- <b-button type =" is-primary" icon-left =" lock-reset " icon-pack = " mdi " @click =" passes(submit)" >
48
- {{ buttonText }}
58
+ <b-button type =" is-primary" icon-left =" cog-outline " @click =" passes(submit)" >
59
+ {{ $t('provider.linkPasswordProvider.passwordForm.submit') }}
49
60
</b-button >
50
61
</div >
51
62
</ValidationObserver >
@@ -58,19 +69,18 @@ import { Component, Prop, Vue } from 'nuxt-property-decorator'
58
69
import { ValidationObserver } from ' vee-validate'
59
70
import InputWithValidation from ' ~/components/ui/input/InputWithValidation.vue'
60
71
import { LoginCredentials } from ' ~/types'
72
+ import FieldWithValue from ' ~/components/ui/FieldWithValue.vue'
61
73
62
74
@Component ({
63
75
components: {
76
+ FieldWithValue ,
64
77
ValidationObserver ,
65
78
InputWithValidation
66
79
}
67
80
})
68
81
export default class SetPasswordForm extends Vue {
69
- @Prop ({ type: Function , required: true }) confirmCredentials: (credentials : LoginCredentials ) => void ;
70
- @Prop ({ type: String , required: true }) title: string ;
71
- @Prop ({ type: String , required: true }) buttonText: string ;
72
- @Prop ({ type: String , required: false }) description: string ;
73
- @Prop ({ type: String , required: false }) email: string ;
82
+ @Prop ({ type: Function , required: true }) confirmCredentials: (credentials : LoginCredentials ) => void
83
+ @Prop ({ type: String , required: false }) email: string
74
84
75
85
credentials: LoginCredentials = {
76
86
email: this .email ,
0 commit comments