From e3b304846d629d4813897ee3c586544237b7f7cf Mon Sep 17 00:00:00 2001 From: JUDIT GRESKOVITS Date: Thu, 9 Feb 2017 11:56:34 +0000 Subject: [PATCH] Ensure forms are connected in containers --- frontend/src/components/new-project/billing.js | 11 +---------- frontend/src/containers/new-project/billing.js | 13 ++++++++++++- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/frontend/src/components/new-project/billing.js b/frontend/src/components/new-project/billing.js index 458102a6..441fb76e 100644 --- a/frontend/src/components/new-project/billing.js +++ b/frontend/src/components/new-project/billing.js @@ -1,5 +1,4 @@ const React = require('react'); -const ReduxForm = require('redux-form'); const ReactIntl = require('react-intl'); const Styled = require('styled-components'); @@ -9,10 +8,6 @@ const fns = require('@ui/shared/functions'); const Button = require('@ui/components/button'); const Card = require('@ui/components/payment-card'); -const { - reduxForm -} = ReduxForm; - const { FormattedMessage } = ReactIntl; @@ -120,8 +115,4 @@ NewProjectBilling.propTypes = { onSubmit: React.PropTypes.func.isRequired }; -module.exports = reduxForm({ - form: 'create-project', - destroyOnUnmount: false, - forceUnregisterOnUnmount: true -})(NewProjectBilling); +module.exports = NewProjectBilling; diff --git a/frontend/src/containers/new-project/billing.js b/frontend/src/containers/new-project/billing.js index b5081816..59268f6c 100644 --- a/frontend/src/containers/new-project/billing.js +++ b/frontend/src/containers/new-project/billing.js @@ -1,15 +1,20 @@ const React = require('react'); const ReactRedux = require('react-redux'); +const ReduxForm = require('redux-form'); const selectors = require('@state/selectors'); const actions = require('@state/actions'); const PropTypes = require('@root/prop-types'); -const BillingForm = require('@components/new-project/billing'); +const NewProjectBilling = require('@components/new-project/billing'); const { connect } = ReactRedux; +const { + reduxForm +} = ReduxForm; + const { orgByIdSelector } = selectors; @@ -18,6 +23,12 @@ const { handleNewProject } = actions; +const BillingForm = reduxForm({ + form: 'create-project', + destroyOnUnmount: false, + forceUnregisterOnUnmount: true +})(NewProjectBilling); + const Billing = (props) => { const {