GODT-2152: Sign-in dialog validate email and password only when button is pressed.

This commit is contained in:
Xavier Michelon
2022-12-01 08:10:25 +01:00
parent 842c9c8ecd
commit 4375d77a98

View File

@ -208,6 +208,7 @@ FocusScope {
focus: true focus: true
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 24 Layout.topMargin: 24
validateOnEditingFinished: false
onTextChanged: { onTextChanged: {
// remove "invalid username / password error" // remove "invalid username / password error"
@ -232,10 +233,10 @@ FocusScope {
colorScheme: root.colorScheme colorScheme: root.colorScheme
id: passwordTextField id: passwordTextField
label: qsTr("Password") label: qsTr("Password")
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 8 Layout.topMargin: 8
echoMode: TextInput.Password echoMode: TextInput.Password
validateOnEditingFinished: false
onTextChanged: { onTextChanged: {
// remove "invalid username / password error" // remove "invalid username / password error"
@ -335,7 +336,7 @@ FocusScope {
id: twoFactorPasswordTextField id: twoFactorPasswordTextField
label: qsTr("Two-factor code") label: qsTr("Two-factor code")
assistiveText: qsTr("Enter the 6-digit code") assistiveText: qsTr("Enter the 6-digit code")
validateOnEditingFinished: false
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 32 Layout.topMargin: 32
@ -400,10 +401,10 @@ FocusScope {
colorScheme: root.colorScheme colorScheme: root.colorScheme
id: secondPasswordTextField id: secondPasswordTextField
label: qsTr("Mailbox password") label: qsTr("Mailbox password")
Layout.fillWidth: true Layout.fillWidth: true
Layout.topMargin: 8 + implicitHeight + 24 + subTitle.implicitHeight Layout.topMargin: 8 + implicitHeight + 24 + subTitle.implicitHeight
echoMode: TextInput.Password echoMode: TextInput.Password
validateOnEditingFinished: false
validator: function(str) { validator: function(str) {
if (str.length === 0) { if (str.length === 0) {