From 0886a305a4ad99582d23e6a7996a0d6a13b9db00 Mon Sep 17 00:00:00 2001 From: Noelia Date: Mon, 9 May 2022 16:14:30 +0200 Subject: [PATCH] fix(Onboarding/ConfirmationPassword): Remove validation error and enable button only when pw is the expected Removed code related to validation. Modified enable button condition (just only when password is exactly the same than the previous introduced one). Fixes #5611 --- .../Onboarding/views/ConfirmPasswordView.qml | 26 +++++-------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/ui/app/AppLayouts/Onboarding/views/ConfirmPasswordView.qml b/ui/app/AppLayouts/Onboarding/views/ConfirmPasswordView.qml index 4baeb101ea..6158a2ac67 100644 --- a/ui/app/AppLayouts/Onboarding/views/ConfirmPasswordView.qml +++ b/ui/app/AppLayouts/Onboarding/views/ConfirmPasswordView.qml @@ -110,21 +110,19 @@ OnboardingBasePage { else filler.visible = false } } + } - // Just a column filler to keep the component height althought errorTxt.text is "" - Item { - id: filler - width: root.width - visible: true - height: errorTxt.height - } + // Just a column filler to fit the design + Item { + height: Style.current.padding + width: parent.width } StatusButton { id: submitBtn anchors.horizontalCenter: parent.horizontalCenter text: qsTr("Finalise Status Password Creation") - enabled:!submitBtn.loading && confPswInput.text.length >= 6 + enabled: !submitBtn.loading && (confPswInput.text === root.password) property Timer sim: Timer { id: pause @@ -136,19 +134,7 @@ OnboardingBasePage { } } - function checkPasswordMatches() { - if (confPswInput.text !== root.password) { - errorTxt.text = qsTr("Passwords don't match") - return false - } - return true - } - onClicked: { - if (!checkPasswordMatches()) { - return - } - if (OnboardingStore.accountCreated) { if (root.password !== root.tmpPass) { OnboardingStore.changePassword(root.tmpPass, root.password);