From 35ff4c195c4ff91a90b7572f07060b0213898f22 Mon Sep 17 00:00:00 2001 From: sdtsui Date: Sat, 29 Jul 2017 20:55:55 -0700 Subject: [PATCH] [WIP] Isolate form logic from rest of confirmation UI --- ui/app/components/pending-tx.js | 45 ++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 20 deletions(-) diff --git a/ui/app/components/pending-tx.js b/ui/app/components/pending-tx.js index 5324ccd64..2414a9759 100644 --- a/ui/app/components/pending-tx.js +++ b/ui/app/components/pending-tx.js @@ -75,11 +75,8 @@ PendingTx.prototype.render = function () { key: txMeta.id, }, [ - h('form#pending-tx-form', { - onSubmit: this.onSubmit.bind(this), - + h('div', { }, [ - // tx info h('div', [ @@ -305,24 +302,32 @@ PendingTx.prototype.render = function () { }, 'Buy Ether') : null, - h('button', { - onClick: (event) => { - this.resetGasFields() - event.preventDefault() - }, - }, 'Reset'), - // Accept Button - h('input.confirm.btn-green', { - type: 'submit', - value: 'SUBMIT', - style: { marginLeft: '10px' }, - disabled: insufficientBalance || !this.state.valid || !isValidAddress || this.state.submitting, - }), + h('form#pending-tx-form', { + onSubmit: this.onSubmit.bind(this), + }, [ + // Reset Button + h('button', { + onClick: (event) => { + this.resetGasFields() + event.preventDefault() + }, + }, 'Reset'), + + // Accept Button + h('input.confirm.btn-green', { + type: 'submit', + value: 'SUBMIT', + style: { marginLeft: '10px' }, + disabled: insufficientBalance || !this.state.valid || !isValidAddress || this.state.submitting, + }), + + // Cancel Button + h('button.cancel.btn-red', { + onClick: props.cancelTransaction, + }, 'Reject'), + ]), - h('button.cancel.btn-red', { - onClick: props.cancelTransaction, - }, 'Reject'), ]), ]), ])