fix: fix conditions for button disabled

This commit is contained in:
Jonathan Rainville 2020-06-08 16:48:30 -04:00 committed by Iuri Matias
parent 43df7d2f77
commit 61606a872e
2 changed files with 4 additions and 4 deletions

View File

@ -68,13 +68,13 @@ ModalPopup {
anchors.rightMargin: Theme.padding
label: "Add account >"
disabled: passwordInput.text === "" && accountNameInput === "" || accountSeedInput.text == ""
disabled: passwordInput.text === "" || accountNameInput.text === "" || accountSeedInput.textAreaText === ""
onClicked : {
// TODO add message to show validation errors
if (passwordInput.text === "" || accountNameInput.text === "" || accountSeedInput.text == "") return;
if (passwordInput.text === "" || accountNameInput.text === "" || accountSeedInput.textAreaText === "") return;
walletModel.addAccountsFromSeed(accountSeedInput.text, passwordInput.text, accountNameInput.text, selectedColor)
walletModel.addAccountsFromSeed(accountSeedInput.textAreaText, passwordInput.text, accountNameInput.text, selectedColor)
// TODO manage errors adding account
popup.close();
}

View File

@ -56,7 +56,7 @@ ModalPopup {
anchors.rightMargin: Theme.padding
label: "Add account >"
disabled: passwordInput.text === "" && accountNameInput === ""
disabled: passwordInput.text === "" || accountNameInput.text === ""
onClicked : {
// TODO add message to show validation errors