Commit 611016f4 authored by Karel Slaný's avatar Karel Slaný

Changed message on wrongly entered new PIN code.

parent 3124c536
......@@ -132,7 +132,7 @@ Component {
echoMode: TextInput.Password
passwordMaskDelay: 500 // milliseconds
inputMethodHints: Qt.ImhDigitsOnly
placeholderText: qsTr("New PIN code (again)")
placeholderText: qsTr("Confirm new PIN code")
text: ""
}
Text {
......@@ -180,16 +180,16 @@ Component {
onClicked: {
/* set new pin code */
if (actionName == "new") {
if (setPinCodeString.text == "") {
errorLabel.text = qsTr("Error: New PIN code is missing!")
if (setPinCodeString.text == "" || setPinCodeString2.text == "") {
errorLabel.text = qsTr("Error: Both new PIN code fields must be filled in!")
errorLabel.visible = true
setPinCodeString.focus = true
} else if (setPinCodeString2.text == "") {
errorLabel.text = qsTr("Error: New PIN code confirmation is missing!")
errorLabel.visible = true
setPinCodeString2.focus = true
if (setPinCodeString.text == "") {
setPinCodeString.focus = true
} else if (setPinCodeString2.text == "") {
setPinCodeString2.focus = true
}
} else if (setPinCodeString2.text != setPinCodeString.text) {
errorLabel.text = qsTr("Error: Both PIN codes are different!")
errorLabel.text = qsTr("Error: Newly entered PIN codes are different!")
errorLabel.visible = true
setPinCodeString2.focus = true
} else {
......@@ -201,16 +201,16 @@ Component {
} else if (actionName == "change") {
if (getPinCodeString.text == currentPIN) {
errorLabel.visible = false
if (setPinCodeString.text == "") {
errorLabel.text = qsTr("Error: New PIN code is missing!")
errorLabel.visible = true
setPinCodeString.focus = true
} else if (setPinCodeString2.text == "") {
errorLabel.text = qsTr("Error: PIN code confirmation is missing!")
if (setPinCodeString.text == "" || setPinCodeString2.text == "") {
errorLabel.text = qsTr("Error: Both new PIN code fields must be filled in!")
errorLabel.visible = true
setPinCodeString2.focus = true
if (setPinCodeString.text == "") {
setPinCodeString.focus = true
} else if (setPinCodeString2.text == "") {
setPinCodeString2.focus = true
}
} else if (setPinCodeString2.text != setPinCodeString.text) {
errorLabel.text = qsTr("Error: Both PIN codes are different!")
errorLabel.text = qsTr("Error: Newly entered PIN codes are different!")
errorLabel.visible = true
setPinCodeString2.focus = true
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment