Merge pull request #244 from yldio/fix/form-connect-in-container
Fix/form connect in container
This commit is contained in:
commit
8f9b892fc7
@ -1,5 +1,4 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const ReduxForm = require('redux-form');
|
|
||||||
const ReactIntl = require('react-intl');
|
const ReactIntl = require('react-intl');
|
||||||
const Styled = require('styled-components');
|
const Styled = require('styled-components');
|
||||||
|
|
||||||
@ -9,10 +8,6 @@ const fns = require('@ui/shared/functions');
|
|||||||
const Button = require('@ui/components/button');
|
const Button = require('@ui/components/button');
|
||||||
const Card = require('@ui/components/payment-card');
|
const Card = require('@ui/components/payment-card');
|
||||||
|
|
||||||
const {
|
|
||||||
reduxForm
|
|
||||||
} = ReduxForm;
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
FormattedMessage
|
FormattedMessage
|
||||||
} = ReactIntl;
|
} = ReactIntl;
|
||||||
@ -120,8 +115,4 @@ NewProjectBilling.propTypes = {
|
|||||||
onSubmit: React.PropTypes.func.isRequired
|
onSubmit: React.PropTypes.func.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = reduxForm({
|
module.exports = NewProjectBilling;
|
||||||
form: 'create-project',
|
|
||||||
destroyOnUnmount: false,
|
|
||||||
forceUnregisterOnUnmount: true
|
|
||||||
})(NewProjectBilling);
|
|
||||||
|
@ -10,8 +10,7 @@ const Input = require('@ui/components/input');
|
|||||||
const Button = require('@ui/components/button');
|
const Button = require('@ui/components/button');
|
||||||
|
|
||||||
const {
|
const {
|
||||||
Field,
|
Field
|
||||||
reduxForm
|
|
||||||
} = ReduxForm;
|
} = ReduxForm;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@ -115,8 +114,4 @@ CreateProject.propTypes = {
|
|||||||
submitting: React.PropTypes.bool.isRequired
|
submitting: React.PropTypes.bool.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = reduxForm({
|
module.exports = CreateProject;
|
||||||
form: 'create-project',
|
|
||||||
destroyOnUnmount: false,
|
|
||||||
forceUnregisterOnUnmount: true
|
|
||||||
})(CreateProject);
|
|
||||||
|
@ -10,8 +10,7 @@ const Input = require('@ui/components/input');
|
|||||||
const Button = require('@ui/components/button');
|
const Button = require('@ui/components/button');
|
||||||
|
|
||||||
const {
|
const {
|
||||||
Field,
|
Field
|
||||||
reduxForm
|
|
||||||
} = ReduxForm;
|
} = ReduxForm;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@ -146,9 +145,4 @@ CreateBilling.propTypes = {
|
|||||||
submitting: React.PropTypes.bool.isRequired
|
submitting: React.PropTypes.bool.isRequired
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = reduxForm({
|
module.exports = CreateBilling;
|
||||||
form: 'create-project',
|
|
||||||
/*destroyOnUnmount: false,
|
|
||||||
forceUnregisterOnUnmount: true/*,
|
|
||||||
validate*/
|
|
||||||
})(CreateBilling);
|
|
||||||
|
@ -1,15 +1,20 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const ReactRedux = require('react-redux');
|
const ReactRedux = require('react-redux');
|
||||||
|
const ReduxForm = require('redux-form');
|
||||||
const selectors = require('@state/selectors');
|
const selectors = require('@state/selectors');
|
||||||
const actions = require('@state/actions');
|
const actions = require('@state/actions');
|
||||||
|
|
||||||
const PropTypes = require('@root/prop-types');
|
const PropTypes = require('@root/prop-types');
|
||||||
const BillingForm = require('@components/new-project/billing');
|
const NewProjectBilling = require('@components/new-project/billing');
|
||||||
|
|
||||||
const {
|
const {
|
||||||
connect
|
connect
|
||||||
} = ReactRedux;
|
} = ReactRedux;
|
||||||
|
|
||||||
|
const {
|
||||||
|
reduxForm
|
||||||
|
} = ReduxForm;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
orgByIdSelector
|
orgByIdSelector
|
||||||
} = selectors;
|
} = selectors;
|
||||||
@ -18,6 +23,12 @@ const {
|
|||||||
handleNewProject
|
handleNewProject
|
||||||
} = actions;
|
} = actions;
|
||||||
|
|
||||||
|
const NewProjectBillingForm = reduxForm({
|
||||||
|
form: 'create-project',
|
||||||
|
destroyOnUnmount: false,
|
||||||
|
forceUnregisterOnUnmount: true
|
||||||
|
})(NewProjectBilling);
|
||||||
|
|
||||||
const Billing = (props) => {
|
const Billing = (props) => {
|
||||||
|
|
||||||
const {
|
const {
|
||||||
@ -41,7 +52,7 @@ const Billing = (props) => {
|
|||||||
router.push(`/${org.id}/new-project/new-billing`);
|
router.push(`/${org.id}/new-project/new-billing`);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BillingForm
|
<NewProjectBillingForm
|
||||||
cards={cards}
|
cards={cards}
|
||||||
onNewBilling={onNewBilling}
|
onNewBilling={onNewBilling}
|
||||||
onSubmit={onSubmit}
|
onSubmit={onSubmit}
|
||||||
|
@ -1,15 +1,20 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const ReactRedux = require('react-redux');
|
const ReactRedux = require('react-redux');
|
||||||
|
const ReduxForm = require('redux-form');
|
||||||
const selectors = require('@state/selectors');
|
const selectors = require('@state/selectors');
|
||||||
const actions = require('@state/actions');
|
const actions = require('@state/actions');
|
||||||
|
|
||||||
const PropTypes = require('@root/prop-types');
|
const PropTypes = require('@root/prop-types');
|
||||||
const NewBillingForm = require('@components/new-project/new-billing');
|
const CreateBilling = require('@components/new-project/new-billing');
|
||||||
|
|
||||||
const {
|
const {
|
||||||
connect
|
connect
|
||||||
} = ReactRedux;
|
} = ReactRedux;
|
||||||
|
|
||||||
|
const {
|
||||||
|
reduxForm
|
||||||
|
} = ReduxForm;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
orgByIdSelector
|
orgByIdSelector
|
||||||
} = selectors;
|
} = selectors;
|
||||||
@ -18,6 +23,10 @@ const {
|
|||||||
handleNewProject
|
handleNewProject
|
||||||
} = actions;
|
} = actions;
|
||||||
|
|
||||||
|
const NewBillingForm = reduxForm({
|
||||||
|
form: 'create-project'
|
||||||
|
})(CreateBilling);
|
||||||
|
|
||||||
const NewBilling = (props) => {
|
const NewBilling = (props) => {
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
@ -1,18 +1,28 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const ReactRedux = require('react-redux');
|
const ReactRedux = require('react-redux');
|
||||||
|
const ReduxForm = require('redux-form');
|
||||||
const selectors = require('@state/selectors');
|
const selectors = require('@state/selectors');
|
||||||
const PropTypes = require('@root/prop-types');
|
const PropTypes = require('@root/prop-types');
|
||||||
const NewProjectForm = require('@components/new-project');
|
const CreateProject = require('@components/new-project');
|
||||||
|
|
||||||
const {
|
const {
|
||||||
connect
|
connect
|
||||||
} = ReactRedux;
|
} = ReactRedux;
|
||||||
|
|
||||||
|
const {
|
||||||
|
reduxForm
|
||||||
|
} = ReduxForm;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
orgByIdSelector
|
orgByIdSelector
|
||||||
} = selectors;
|
} = selectors;
|
||||||
|
|
||||||
|
const NewProjectForm = reduxForm({
|
||||||
|
form: 'create-project',
|
||||||
|
destroyOnUnmount: false,
|
||||||
|
forceUnregisterOnUnmount: true
|
||||||
|
})(CreateProject);
|
||||||
|
|
||||||
const NewProject = (props) => {
|
const NewProject = (props) => {
|
||||||
|
|
||||||
const {
|
const {
|
||||||
|
Loading…
Reference in New Issue
Block a user