diff --git a/js/actions/ImportActions.js b/js/actions/ImportActions.js index 7c2b6dd..3ece1e6 100644 --- a/js/actions/ImportActions.js +++ b/js/actions/ImportActions.js @@ -145,12 +145,12 @@ function importFile(url, inputElement) { } function importOFXFile(inputElement, account) { - url = "account/"+account.AccountId+"/import/ofxfile"; + var url = "account/"+account.AccountId+"/import/ofxfile"; return importFile(url, inputElement); } function importGnucash(inputElement) { - url = "import/gnucash"; + var url = "import/gnucash"; return importFile(url, inputElement); } diff --git a/js/components/AccountRegister.js b/js/components/AccountRegister.js index 5a92c66..0b04457 100644 --- a/js/components/AccountRegister.js +++ b/js/components/AccountRegister.js @@ -781,7 +781,9 @@ class AccountRegister extends React.Component { handleImportComplete() { this.props.onCloseImportModal(); this.props.onFetchAllAccounts(); - this.props.onFetchTransactionPage(this.props.accounts[this.props.selectedAccount], this.props.pageSize, this.props.transactionPage.page); + if (this.props.selectedAccount != -1) { + this.props.onFetchTransactionPage(this.props.accounts[this.props.selectedAccount], this.props.pageSize, this.props.transactionPage.page); + } } handleDeleteTransaction(transaction) { this.props.onDeleteTransaction(transaction); diff --git a/js/components/NewUserModal.js b/js/components/NewUserModal.js index 62791a6..dc8587b 100644 --- a/js/components/NewUserModal.js +++ b/js/components/NewUserModal.js @@ -27,6 +27,9 @@ class NewUserModal extends React.Component { passwordChanged: false, initial_password: "" }; + this.onCancel = this.handleCancel.bind(this); + this.onChange = this.handleChange.bind(this); + this.onSubmit = this.handleSubmit.bind(this); } passwordValidationState() { if (this.state.passwordChanged) { @@ -81,19 +84,19 @@ class NewUserModal extends React.Component { } render() { return ( - + Create New user {this.state.error} -
+ Name @@ -102,7 +105,7 @@ class NewUserModal extends React.Component { @@ -111,7 +114,7 @@ class NewUserModal extends React.Component { @@ -120,7 +123,7 @@ class NewUserModal extends React.Component { @@ -130,7 +133,7 @@ class NewUserModal extends React.Component { @@ -139,9 +142,9 @@ class NewUserModal extends React.Component { - -