From 259fd5404d175c0b3d753b50ebfcd2fbfeb9446f Mon Sep 17 00:00:00 2001 From: ogerly Date: Sat, 12 Jun 2021 10:52:10 +0200 Subject: [PATCH] remove base-input from register.vue --- frontend/src/views/Pages/Login.vue | 16 +- frontend/src/views/Pages/Register.vue | 240 +++++++++++++++++++------- 2 files changed, 178 insertions(+), 78 deletions(-) diff --git a/frontend/src/views/Pages/Login.vue b/frontend/src/views/Pages/Login.vue index d388bea5f..23e5741f2 100755 --- a/frontend/src/views/Pages/Login.vue +++ b/frontend/src/views/Pages/Login.vue @@ -30,9 +30,9 @@ :rules="{ required: true, email: true }" v-slot="validationContext" > - +
- {{ $t('login') }}
@@ -138,16 +137,7 @@ export default { getValidationState({ dirty, validated, valid = null }) { return dirty || validated ? valid : null }, - //resetForm() { - // this.model = { - // email: null, - // password: null, - // } - // - // this.$nextTick(() => { - // this.$refs.observer.reset() - // }) - //}, + togglePasswordVisibility() { this.passwordVisible = !this.passwordVisible diff --git a/frontend/src/views/Pages/Register.vue b/frontend/src/views/Pages/Register.vue index d7b9ab8f0..f427c5a8c 100755 --- a/frontend/src/views/Pages/Register.vue +++ b/frontend/src/views/Pages/Register.vue @@ -23,65 +23,146 @@
{{ $t('signup') }}
- + + + - - + v-slot="validationContext" + > - - -
- - + - - - - - - - + + {{ validationContext.errors[0] }} + +
- + + + + + + + + + + + {{ validationContext.errors[0] }} + + + + + + + + + + + + + {{ validationContext.errors[0] }} + + + + +
+ + + + + + + + + + + + + + + + + {{ validationContext.errors[0] }} + + + + + + + + + + + + + + + + +
    @@ -99,14 +180,18 @@ - - - - - + + + + + + + - - {{ $t('signup') }} - + + + +
    + {{ $t('form.reset') }} + {{ $t('signup') }} +
    +
@@ -165,17 +255,37 @@ export default { }, password: '', - checkPassword: '', + passwordRepeat: '', passwordVisible: false, + passwordVisibleRepeat: false, submitted: false, showError: false, messageError: '', } }, methods: { + getValidationState({ dirty, validated, valid = null }) { + return dirty || validated ? valid : null + }, + resetForm() { + this.model = { + firstname: '', + lastname: '', + email: '', + } + this.password= '', + this.passwordRepeat= '', + + this.$nextTick(() => { + this.$refs.observer.reset() + }) + }, togglePasswordVisibility() { this.passwordVisible = !this.passwordVisible }, + togglePasswordRepeatVisibility() { + this.passwordVisibleRepeat = !this.passwordVisibleRepeat + }, async onSubmit() { const result = await loginAPI.create( this.model.email, @@ -209,10 +319,10 @@ export default { }, computed: { samePasswords() { - return this.password === this.checkPassword + return this.password === this.passwordRepeat }, passwordsFilled() { - return this.password !== '' && this.checkPassword !== '' + return this.password !== '' && this.passwordRepeat !== '' }, namesFilled() { return (