mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Remove the defaultValue, stored email, etc...
This commit is contained in:
parent
016f5ef657
commit
08dd7c3518
@ -4,7 +4,6 @@
|
||||
:rules="rules"
|
||||
:name="name"
|
||||
v-slot="{ errors, valid, validated, ariaInput, ariaMsg }"
|
||||
immediate
|
||||
>
|
||||
<b-form-group :label="label" :label-for="labelFor">
|
||||
<b-form-input
|
||||
@ -39,11 +38,10 @@ export default {
|
||||
label: { type: String, default: 'Email' },
|
||||
placeholder: { type: String, default: 'Email' },
|
||||
value: { required: true, type: String },
|
||||
defaultValue: { type: String },
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentValue: this.defaultValue !== undefined ? this.defaultValue : '',
|
||||
currentValue: '',
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -59,10 +57,5 @@ export default {
|
||||
if (this.value !== this.currentValue) this.currentValue = this.value
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (this.defaultValue !== undefined) {
|
||||
this.$emit('input', this.currentValue)
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -28,11 +28,6 @@ const createMockObject = (comingFrom) => {
|
||||
comingFrom,
|
||||
},
|
||||
},
|
||||
$store: {
|
||||
state: {
|
||||
email: undefined,
|
||||
},
|
||||
},
|
||||
},
|
||||
stubs,
|
||||
}
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
<b-card-body class="p-4">
|
||||
<validation-observer ref="observer" v-slot="{ handleSubmit }">
|
||||
<b-form role="form" @submit.prevent="handleSubmit(onSubmit)">
|
||||
<input-email v-model="form.email" :defaultValue="defaultEmail"></input-email>
|
||||
<input-email v-model="form.email"></input-email>
|
||||
<div class="text-center">
|
||||
<b-button type="submit" variant="primary">
|
||||
{{ $t(displaySetup.button) }}
|
||||
@ -68,7 +68,6 @@ export default {
|
||||
email: '',
|
||||
},
|
||||
displaySetup: {},
|
||||
defaultEmail: this.$store.state.email,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
|
||||
@ -107,10 +107,8 @@ export default {
|
||||
.catch((error) => {
|
||||
this.toastError(this.$t('error.no-account'))
|
||||
if (error.message.includes('User email not validated')) {
|
||||
this.$store.commit('email', this.form.email)
|
||||
this.$router.push('/thx/login')
|
||||
} else if (error.message.includes('User has no password set yet')) {
|
||||
this.$store.commit('email', this.form.email)
|
||||
this.$router.push('/reset-password/login')
|
||||
}
|
||||
loader.hide()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user