From dfbc7b75fe647d68de97cf6ace485ac7d700e3e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20Daubensch=C3=BCtz?= Date: Thu, 6 Aug 2015 15:14:50 +0200 Subject: [PATCH] fix loan form --- js/components/ascribe_forms/form_loan.js | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/js/components/ascribe_forms/form_loan.js b/js/components/ascribe_forms/form_loan.js index b261d749..7aae656a 100644 --- a/js/components/ascribe_forms/form_loan.js +++ b/js/components/ascribe_forms/form_loan.js @@ -33,10 +33,10 @@ let LoanForm = React.createClass({ componentDidMount() { LoanContractStore.listen(this.onChange); + LoanContractActions.flushLoanContract(); }, componentWillUnmount() { - LoanContractActions.flushLoanContract(); LoanContractStore.unlisten(this.onChange); }, @@ -88,20 +88,6 @@ let LoanForm = React.createClass({ } }, - onRequestHide() { - // Since the modal can be opened without sending it to the server - // and therefore clearing the store, - // we'll need to make sure to flush the store once the - // modal unmounts - LoanContractActions.updateLoanContract({ - contractUrl: null, - contractEmail: null, - contractKey: null - }); - - this.props.onRequestHide(); - }, - render() { return ( @@ -119,7 +105,7 @@ let LoanForm = React.createClass({ + onClick={this.props.onRequestHide}>{getLangText('CLOSE')}

} spinner={