transfer: change description/pid checkbox

pull/2/head
mmbyday 5 years ago
parent e81cb7e640
commit 9b7adfc0a8

@ -304,64 +304,61 @@ Rectangle {
} }
ColumnLayout { ColumnLayout {
visible: appWindow.persistentSettings.showPid || paymentIdCheckbox.checked spacing: 15
CheckBox { ColumnLayout {
id: paymentIdCheckbox CheckBox {
border: false id: descriptionCheckbox
checkedIcon: "qrc:///images/minus-white.png" border: false
uncheckedIcon: "qrc:///images/plus-white.png" checkedIcon: "qrc:///images/plus-in-circle-medium-white.png"
imgWidth: 12 uncheckedIcon: "qrc:///images/plus-in-circle-medium-white.png"
imgHeight: 12 fontSize: descriptionLine.labelFontSize
fontSize: paymentIdLine.labelFontSize iconOnTheLeft: true
iconOnTheLeft: false Layout.fillWidth: true
Layout.fillWidth: true text: qsTr("Add description") + translationManager.emptyString
text: qsTr("Payment ID <font size='2'>( Optional )</font>") + translationManager.emptyString onClicked: {
onClicked: { if (!descriptionCheckbox.checked) {
if (!paymentIdCheckbox.checked) { descriptionLine.text = "";
paymentIdLine.text = ""; }
} }
} }
}
// payment id input LineEditMulti {
LineEditMulti { id: descriptionLine
id: paymentIdLine placeholderText: qsTr("Saved to local wallet history") + translationManager.emptyString
fontBold: true Layout.fillWidth: true
placeholderText: qsTr("64 hexadecimal characters") + translationManager.emptyString visible: descriptionCheckbox.checked
Layout.fillWidth: true }
wrapMode: Text.WrapAnywhere
addressValidation: false
visible: paymentIdCheckbox.checked
} }
}
ColumnLayout { ColumnLayout {
CheckBox { visible: appWindow.persistentSettings.showPid || paymentIdCheckbox.checked
id: descriptionCheckbox // @TODO: remove after pid removal hardfork
border: false CheckBox {
checkedIcon: "qrc:///images/minus-white.png" id: paymentIdCheckbox
uncheckedIcon: "qrc:///images/plus-white.png" border: false
imgWidth: 12 checkedIcon: "qrc:///images/plus-in-circle-medium-white.png"
imgHeight: 12 uncheckedIcon: "qrc:///images/plus-in-circle-medium-white.png"
fontSize: descriptionLine.labelFontSize fontSize: paymentIdLine.labelFontSize
iconOnTheLeft: false iconOnTheLeft: true
Layout.fillWidth: true Layout.fillWidth: true
text: qsTr("Description <font size='2'>( Optional )</font>") + translationManager.emptyString text: qsTr("Add payment ID") + translationManager.emptyString
onClicked: { onClicked: {
if (!descriptionCheckbox.checked) { if (!paymentIdCheckbox.checked) {
descriptionLine.text = ""; paymentIdLine.text = "";
}
} }
} }
}
LineEditMulti { // payment id input
id: descriptionLine LineEditMulti {
placeholderText: qsTr("Saved to local wallet history") + translationManager.emptyString id: paymentIdLine
Layout.fillWidth: true fontBold: true
visible: descriptionCheckbox.checked placeholderText: qsTr("64 hexadecimal characters") + translationManager.emptyString
onTextChanged: { Layout.fillWidth: true
paymentIdWarningBox.visible = walletManager.paymentIdValid(text) && !persistentSettings.showPid wrapMode: Text.WrapAnywhere
addressValidation: false
visible: paymentIdCheckbox.checked
} }
} }
} }