|
@@ -11,6 +11,12 @@ Page {
|
|
|
onSignupSetStatus: {
|
|
|
signupStatusText.text = status
|
|
|
}
|
|
|
+ onSignupEnableRegisterButton: {
|
|
|
+ signupRegisterButton.enabled = true
|
|
|
+ }
|
|
|
+ onSignupDisableRegisterButton: {
|
|
|
+ signupRegisterButton.enabled = false
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
ColumnLayout {
|
|
@@ -38,6 +44,13 @@ Page {
|
|
|
Keys.onReturnPressed: signupRegisterButton.activate()
|
|
|
// @disable-check M222
|
|
|
Keys.onEnterPressed: signupRegisterButton.activate()
|
|
|
+
|
|
|
+ onTextEdited: {
|
|
|
+ signupStatusText.text = ""
|
|
|
+ signupRegisterButton.enabled = (signupUsernameInput.text != ""
|
|
|
+ && signupPasswordOneInput.text != ""
|
|
|
+ && signupPasswordTwoInput.text != "")
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
TextField {
|
|
@@ -54,7 +67,12 @@ Page {
|
|
|
Keys.onEnterPressed: signupRegisterButton.activate()
|
|
|
echoMode: TextInput.Password
|
|
|
|
|
|
- onTextEdited: signupStatusText.text = ""
|
|
|
+ onTextEdited: {
|
|
|
+ signupStatusText.text = ""
|
|
|
+ signupRegisterButton.enabled = (signupUsernameInput.text != ""
|
|
|
+ && signupPasswordOneInput.text != ""
|
|
|
+ && signupPasswordTwoInput.text != "")
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
TextField {
|
|
@@ -71,7 +89,12 @@ Page {
|
|
|
Keys.onEnterPressed: signupRegisterButton.activate()
|
|
|
echoMode: TextInput.Password
|
|
|
|
|
|
- onTextEdited: signupStatusText.text = ""
|
|
|
+ onTextEdited: {
|
|
|
+ signupStatusText.text = ""
|
|
|
+ signupRegisterButton.enabled = (signupUsernameInput.text != ""
|
|
|
+ && signupPasswordOneInput.text != ""
|
|
|
+ && signupPasswordTwoInput.text != "")
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
Text {
|
|
@@ -88,9 +111,7 @@ Page {
|
|
|
Layout.alignment: Qt.AlignCenter
|
|
|
id: signupRegisterButton
|
|
|
text: qsTr("Register")
|
|
|
- enabled: (signupUsernameInput.text != ""
|
|
|
- && signupPasswordOneInput.text != ""
|
|
|
- && signupPasswordTwoInput.text != "")
|
|
|
+ enabled: false
|
|
|
font.pointSize: 16
|
|
|
// @disable-check M223
|
|
|
onClicked: {
|