1
0
mirror of https://github.com/aclindsa/moneygo.git synced 2024-12-26 23:42:29 -05:00

AccountRegister.js: Fixup for some React and ReactBootstrap changes

This commit is contained in:
Aaron Lindsay 2017-02-18 21:50:48 -05:00
parent b443963375
commit 1171eeac3f

View File

@ -512,7 +512,7 @@ const ImportTransactionsModal = React.createClass({
} }
}, },
handleImportTransactions: function() { handleImportTransactions: function() {
var file = this.refs.importfile.getInputDOMNode().files[0]; var file = ReactDOM.findDOMNode(this.refs.importfile).files[0];
var formData = new FormData(); var formData = new FormData();
formData.append('importfile', file, this.state.importFile); formData.append('importfile', file, this.state.importFile);
var url = "" var url = ""
@ -560,7 +560,7 @@ const ImportTransactionsModal = React.createClass({
error: function(e) { error: function(e) {
this.setState({importing: false}); this.setState({importing: false});
console.log("error handler", e); console.log("error handler", e);
}, }.bind(this),
// So jQuery doesn't try to process teh data or content-type // So jQuery doesn't try to process teh data or content-type
cache: false, cache: false,
contentType: false, contentType: false,
@ -751,8 +751,8 @@ module.exports = React.createClass({
error: this.ajaxError error: this.ajaxError
}); });
}, },
handleSelectPage: function(event, selectedEvent) { handleSelectPage: function(eventKey) {
var newpage = selectedEvent.eventKey - 1; var newpage = eventKey - 1;
// Don't do pages that don't make sense // Don't do pages that don't make sense
if (newpage < 0) if (newpage < 0)
newpage = 0; newpage = 0;