aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorChi Kei Chan <chikeichan@gmail.com>2017-10-25 07:31:35 +0800
committerGitHub <noreply@github.com>2017-10-25 07:31:35 +0800
commitac3072e037ee97e87ff405d4562ce7e7c00dcd8a (patch)
tree4a54f8431567ed52d79a428acc75dc921d4e1fc9 /ui
parentef2b0d848582788c6cf69a11e17a12358bb2aa7b (diff)
parent09445ef692f5a63b1a4bd418962dca2892e4cda9 (diff)
downloadtangerine-wallet-browser-ac3072e037ee97e87ff405d4562ce7e7c00dcd8a.tar
tangerine-wallet-browser-ac3072e037ee97e87ff405d4562ce7e7c00dcd8a.tar.gz
tangerine-wallet-browser-ac3072e037ee97e87ff405d4562ce7e7c00dcd8a.tar.bz2
tangerine-wallet-browser-ac3072e037ee97e87ff405d4562ce7e7c00dcd8a.tar.lz
tangerine-wallet-browser-ac3072e037ee97e87ff405d4562ce7e7c00dcd8a.tar.xz
tangerine-wallet-browser-ac3072e037ee97e87ff405d4562ce7e7c00dcd8a.tar.zst
tangerine-wallet-browser-ac3072e037ee97e87ff405d4562ce7e7c00dcd8a.zip
Merge pull request #2435 from danjm/NewUI-flat-disable-send-next-in-error
[NewUI] Disable Send-v2 next button when form is in error
Diffstat (limited to 'ui')
-rw-r--r--ui/app/send-v2.js11
1 files changed, 3 insertions, 8 deletions
diff --git a/ui/app/send-v2.js b/ui/app/send-v2.js
index 9b1bf88f7..8b49f7307 100644
--- a/ui/app/send-v2.js
+++ b/ui/app/send-v2.js
@@ -383,8 +383,9 @@ SendTransactionScreen.prototype.renderFooter = function () {
clearSend,
errors: { amount: amountError, to: toError }
} = this.props
-
+
const noErrors = amountError === null && toError === null
+ const errorClass = noErrors ? '' : '__disabled'
return h('div.send-v2__footer', [
h('button.send-v2__cancel-btn', {
@@ -393,13 +394,7 @@ SendTransactionScreen.prototype.renderFooter = function () {
goHome()
},
}, 'Cancel'),
- h(`button`, {
- className: classnames({
- 'send-v2__next-btn': noErrors,
- 'send-v2__next-btn__disabled': !noErrors,
- }),
- disabled: !noErrors,
- onClick: event => this.onSubmit(event),
+ h(`button.send-v2__next-btn${errorClass}`, {
}, 'Next'),
])
}