Commit 212e92f6 authored by Karel Slaný's avatar Karel Slaný

Exporting account settings page content into accessibility interface.

parent c702b1e1
......@@ -76,37 +76,35 @@ Item {
spacing: defaultMargin
anchors.right: parent.right
anchors.rightMargin: defaultMargin
Image {
AccessibleImageButton {
id: actionButton
anchors.verticalCenter: parent.verticalCenter
sourceSize.height: imgHeightHeader
source: "qrc:/ui/checkbox-marked-circle.svg"
MouseArea {
anchors.fill: parent
onClicked: {
if (isNewAccount) {
// Create a new account context data and add to model.
if (accounts.createAccount(accountModel, sLoginMethod,
accessibleName: qsTr("Accept changes")
onClicked: {
if (isNewAccount) {
// Create a new account context data and add to model.
if (accounts.createAccount(accountModel, sLoginMethod,
accountNameTextField.text.toString(),
userNameTextField.text.toString(),
passwordTextField.text.toString(),
testAccount.checked, rememberPassword.checked,
useLS.checked, certPathLabelId.text.toString())) {
// Login to new account.
isds.doIsdsAction("addNewAccount", userNameTextField.text.toString())
}
} else {
// Update account context data.
if (accounts.updateAccount(accountModel, sLoginMethod,
accountNameTextField.text.toString(),
userNameTextField.text.toString(),
passwordTextField.text.toString(),
testAccount.checked, rememberPassword.checked,
useLS.checked, certPathLabelId.text.toString())) {
// Login to new account.
isds.doIsdsAction("addNewAccount", userNameTextField.text.toString())
}
} else {
// Update account context data.
if (accounts.updateAccount(accountModel, sLoginMethod,
accountNameTextField.text.toString(),
userNameTextField.text.toString(),
passwordTextField.text.toString(),
testAccount.checked, rememberPassword.checked,
useLS.checked, certPathLabelId.text.toString())) {
settings.saveAllSettings(accountModel)
}
pageView.pop(StackView.Immediate)
settings.saveAllSettings(accountModel)
}
pageView.pop(StackView.Immediate)
}
}
Connections {
......@@ -153,7 +151,7 @@ Item {
anchors.right: parent.right
anchors.left: parent.left
spacing: formItemVerticalSpacing
Text {
AccessibleText {
id: loginMethodLabel
color: datovkaPalette.text
text: qsTr("Login method")
......@@ -198,13 +196,13 @@ Item {
}
}
}
Text {
AccessibleText {
id: certificateLabel
visible: false
color: datovkaPalette.text
text: qsTr("Certificate")
}
Text {
AccessibleText {
id: certPathLabelId
visible: false
color: datovkaPalette.text
......@@ -222,7 +220,7 @@ Item {
fileDialogue.raise("Select certificate file", "*.pem", true)
}
}
Text {
AccessibleText {
color: datovkaPalette.text
text: qsTr("Account title")
}
......@@ -244,7 +242,7 @@ Item {
}
}
}
Text {
AccessibleText {
color: datovkaPalette.text
text: qsTr("Username")
}
......@@ -267,7 +265,7 @@ Item {
}
}
}
Text {
AccessibleText {
color: datovkaPalette.text
text: qsTr("Password")
}
......@@ -302,7 +300,7 @@ Item {
text: qsTr("Test account")
font.pointSize: defaultTextFont.font.pointSize
}
Text {
AccessibleText {
id: testAccountLabel
color: datovkaPalette.mid
width: parent.width
......@@ -315,7 +313,7 @@ Item {
text: qsTr("Use local storage (database)")
checked: true
}
Text {
AccessibleText {
color: datovkaPalette.mid
width: parent.width
text: (useLS.checked ?
......
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