geer-builder 1.2.679 → 1.2.680
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/GRegistration.vue +47 -1
- package/package.json +1 -1
package/GRegistration.vue
CHANGED
|
@@ -59,7 +59,44 @@
|
|
|
59
59
|
<div class="g-registration__fields q-mt-md">
|
|
60
60
|
<div class="label">Password</div>
|
|
61
61
|
<div class="input">
|
|
62
|
-
<q-input type="password" v-model="form_data.password" dense placeholder="Enter Password" outlined stack-label
|
|
62
|
+
<q-input :type="showPassword ? 'text' : 'password'" v-model="form_data.password" dense placeholder="Enter Password" outlined stack-label>
|
|
63
|
+
<template v-slot:append>
|
|
64
|
+
<q-icon
|
|
65
|
+
name="visibility"
|
|
66
|
+
:class="{ 'text-grey': !showPassword }"
|
|
67
|
+
@click="showPassword = !showPassword"
|
|
68
|
+
v-show="!showPassword"
|
|
69
|
+
/>
|
|
70
|
+
<q-icon
|
|
71
|
+
name="visibility_off"
|
|
72
|
+
:class="{ 'text-grey': showPassword }"
|
|
73
|
+
@click="showPassword = !showPassword"
|
|
74
|
+
v-show="showPassword"
|
|
75
|
+
/>
|
|
76
|
+
</template>
|
|
77
|
+
</q-input>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
<div v-if="terms_and_conditions.confirm_password" class="g-registration__fields q-mt-md">
|
|
82
|
+
<div class="label">Confirm Password</div>
|
|
83
|
+
<div class="input">
|
|
84
|
+
<q-input :rules="[ val => val === form_data.password || `Password didn't match.`]" :type="showPasswordConfirm ? 'text' : 'password'" v-model="form_data.confirm_password" dense placeholder="Enter Confirm Password" outlined stack-label>
|
|
85
|
+
<template v-slot:append>
|
|
86
|
+
<q-icon
|
|
87
|
+
name="visibility"
|
|
88
|
+
:class="{ 'text-grey': !showPasswordConfirm }"
|
|
89
|
+
@click="showPasswordConfirm = !showPasswordConfirm"
|
|
90
|
+
v-show="!showPasswordConfirm"
|
|
91
|
+
/>
|
|
92
|
+
<q-icon
|
|
93
|
+
name="visibility_off"
|
|
94
|
+
:class="{ 'text-grey': showPasswordConfirm }"
|
|
95
|
+
@click="showPasswordConfirm = !showPasswordConfirm"
|
|
96
|
+
v-show="showPasswordConfirm"
|
|
97
|
+
/>
|
|
98
|
+
</template>
|
|
99
|
+
</q-input>
|
|
63
100
|
</div>
|
|
64
101
|
</div>
|
|
65
102
|
|
|
@@ -147,6 +184,8 @@ export default
|
|
|
147
184
|
terms_and_conditions : '',
|
|
148
185
|
region_list : [],
|
|
149
186
|
international_country:false,
|
|
187
|
+
showPassword: false,
|
|
188
|
+
showPasswordConfirm: false
|
|
150
189
|
}),
|
|
151
190
|
async mounted()
|
|
152
191
|
{
|
|
@@ -194,6 +233,8 @@ export default
|
|
|
194
233
|
},
|
|
195
234
|
async submitCreateAccount()
|
|
196
235
|
{
|
|
236
|
+
|
|
237
|
+
|
|
197
238
|
// console.log('account_data: ', this.form_data);
|
|
198
239
|
if(!this.international_country)
|
|
199
240
|
{
|
|
@@ -219,6 +260,11 @@ export default
|
|
|
219
260
|
this.is_submitting = true;
|
|
220
261
|
try
|
|
221
262
|
{
|
|
263
|
+
if (this.terms_and_conditions.confirm_password && this.form_data.password !== this.form_data.confirm_password)
|
|
264
|
+
{
|
|
265
|
+
throw new Error('Password confirmation does not match. Please try again.');
|
|
266
|
+
}
|
|
267
|
+
|
|
222
268
|
console.log(this.form_data);
|
|
223
269
|
let callbackCreateAccount = await this.$_fbCall('frontRegistration', this.form_data);
|
|
224
270
|
this.$emit('success', this.form_data);
|