diff --git a/webapp/components/Registration/RegistrationItemCreateUserAccount.vue b/webapp/components/Registration/RegistrationItemCreateUserAccount.vue index a8608f817..861cb4310 100644 --- a/webapp/components/Registration/RegistrationItemCreateUserAccount.vue +++ b/webapp/components/Registration/RegistrationItemCreateUserAccount.vue @@ -227,14 +227,14 @@ export default { : false this.sendValidation() - this.sliderData.setSliderValuesCallback(this.valid, { + this.sliderData.setSliderValuesCallback(this.validInput, { sliderSettings: { buttonSliderCallback: this.onNextClick }, }) }) }, computed: { - valid() { - const isValid = + validInput() { + return ( this.formData.name.length >= 3 && this.formData.password.length >= 1 && this.formData.password === this.formData.passwordConfirmation && @@ -243,7 +243,7 @@ export default { this.minimumAge && this.noCommercial && this.noPolitical - return isValid + ) }, }, watch: { @@ -275,22 +275,23 @@ export default { noPolitical, } = this const locale = this.$i18n.locale() - const values = { - name, - about, - password, - passwordConfirmation, - termsAndConditionsAgreedVersion, - termsAndConditionsConfirmed, - dataPrivacy, - minimumAge, - noCommercial, - noPolitical, - locale, - } // Wolle validate in backend // toaster - this.sliderData.setSliderValuesCallback(this.valid, { collectedInputData: values }) + this.sliderData.setSliderValuesCallback(this.validInput, { + collectedInputData: { + name, + about, + password, + passwordConfirmation, + termsAndConditionsAgreedVersion, + termsAndConditionsConfirmed, + dataPrivacy, + minimumAge, + noCommercial, + noPolitical, + locale, + }, + }) }, async handleInput() { this.sendValidation() diff --git a/webapp/components/Registration/RegistrationItemEnterEmail.vue b/webapp/components/Registration/RegistrationItemEnterEmail.vue index f6e485b4c..156140104 100644 --- a/webapp/components/Registration/RegistrationItemEnterEmail.vue +++ b/webapp/components/Registration/RegistrationItemEnterEmail.vue @@ -164,9 +164,8 @@ export default { this.formData.email = normalizeEmail(this.formData.email) } const { email } = this.formData - const values = { email } - this.sliderData.setSliderValuesCallback(this.validInput, { collectedInputData: values }) + this.sliderData.setSliderValuesCallback(this.validInput, { collectedInputData: { email } }) }, async handleInput() { this.sendValidation() diff --git a/webapp/components/Registration/RegistrationItemEnterInvite.vue b/webapp/components/Registration/RegistrationItemEnterInvite.vue index e133c2fba..524b46bbe 100644 --- a/webapp/components/Registration/RegistrationItemEnterInvite.vue +++ b/webapp/components/Registration/RegistrationItemEnterInvite.vue @@ -73,14 +73,13 @@ export default { methods: { async sendValidation() { const { inviteCode } = this.formData - const values = { inviteCode } let validated = false if (this.validInput) { await this.handleSubmitVerify() validated = this.sliderData.sliders[this.sliderIndex].data.response.isValidInviteCode } - this.sliderData.setSliderValuesCallback(validated, { collectedInputData: values }) + this.sliderData.setSliderValuesCallback(validated, { collectedInputData: { inviteCode } }) }, async handleInput() { this.sendValidation() diff --git a/webapp/components/Registration/RegistrationItemEnterNonce.vue b/webapp/components/Registration/RegistrationItemEnterNonce.vue index b93f36be7..924bebde3 100644 --- a/webapp/components/Registration/RegistrationItemEnterNonce.vue +++ b/webapp/components/Registration/RegistrationItemEnterNonce.vue @@ -62,24 +62,24 @@ export default { this.sendValidation() // Wolle this.sliderData.setSliderValuesCallback(this.validInput, {}, {}, this.onNextClick) - this.sliderData.setSliderValuesCallback(this.valid, { + this.sliderData.setSliderValuesCallback(this.validInput, { sliderSettings: { buttonSliderCallback: this.onNextClick }, }) }) }, computed: { - valid() { + validInput() { return this.formData.nonce.length === 6 }, }, methods: { sendValidation() { const { nonce } = this.formData - const values = { - nonce, - } - // console.log('sendValidation !!! value: ', value) - this.sliderData.setSliderValuesCallback(this.valid, { collectedInputData: values }) + this.sliderData.setSliderValuesCallback(this.validInput, { + collectedInputData: { + nonce, + }, + }) }, async handleInput() { // this.disabled = true