-
Notifications
You must be signed in to change notification settings - Fork 504
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e2eef6d
commit d9864e6
Showing
4 changed files
with
184 additions
and
126 deletions.
There are no files selected for viewing
76 changes: 20 additions & 56 deletions
76
...ages/blockchain-wallet-v4-frontend/src/modals/CoinifyExchangeData/AddBankDetails/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,27 @@ | ||
import React from 'react' | ||
import { reduxForm, Field } from 'redux-form' | ||
import { FormattedMessage } from 'react-intl' | ||
import styled from 'styled-components' | ||
import { Button, Link, Text } from 'blockchain-info-components' | ||
import { connect } from 'react-redux' | ||
import AddBankDetails from './template.js' | ||
|
||
import { flex, spacing } from 'services/StyleService' | ||
import { StepTransition } from 'components/Utilities/Stepper' | ||
import { Form, ColLeft, InputWrapper, PartnerHeader, PartnerSubHeader, ColRight, ColRightInner } from 'components/BuySell/Signup' | ||
import { TextBox } from 'components/Form' | ||
class AddBankDetailsContainer extends React.PureComponent { | ||
constructor (props) { | ||
super(props) | ||
this.onSubmit = this.onSubmit.bind(this) | ||
} | ||
|
||
const CancelWrapper = styled.div` | ||
a { | ||
color: #545456; | ||
font-weight: 300; | ||
font-size: 14px; | ||
onSubmit (e) { | ||
e.preventDefault() | ||
// TODO: Store form data in the state | ||
} | ||
` | ||
const BorderBox = styled.div` | ||
border: 1px solid ${props => props.theme['gray-1']}; | ||
padding: 30px; | ||
` | ||
|
||
const AddBankDetails = (props) => { | ||
return ( | ||
<Form> | ||
<ColLeft> | ||
<BorderBox> | ||
<InputWrapper style={spacing('mb-40')}> | ||
<PartnerHeader> | ||
<FormattedMessage id='coinifyexchangedata.addbankdetails.header' defaultMessage='Add Bank Account' /> | ||
</PartnerHeader> | ||
<PartnerSubHeader> | ||
<FormattedMessage id='coinifyexchangedata.addbankdetails.subheader' defaultMessage='Please enter your bank information below.' /> | ||
</PartnerSubHeader> | ||
<Text weight={300} size='12px'> | ||
<FormattedMessage id='coinifyexchangedata.addbankdetails.iban' defaultMessage='International Bank Account (IBAN)' /> | ||
<Field component={TextBox} /> | ||
</Text> | ||
<Text weight={300} size='12px'> | ||
<FormattedMessage id='coinifyexchangedata.addbankdetails.swift' defaultMessage='Bank Identifier Code (SWIFT/BIC)' /> | ||
<Field component={TextBox} /> | ||
</Text> | ||
</InputWrapper> | ||
</BorderBox> | ||
</ColLeft> | ||
<ColRight> | ||
<ColRightInner> | ||
<StepTransition next Component={Button} style={spacing('mt-45')} nature='primary' fullwidth> | ||
<FormattedMessage id='coinifyexchangedata.addbankdetails.continue' defaultMessage='Continue' /> | ||
</StepTransition> | ||
<CancelWrapper style={{ ...flex('row justify/center'), ...spacing('mt-15') }}> | ||
<StepTransition prev Component={Link}> | ||
<FormattedMessage id='back' defaultMessage='Back' /> | ||
</StepTransition> | ||
</CancelWrapper> | ||
</ColRightInner> | ||
</ColRight> | ||
</Form> | ||
) | ||
render () { | ||
return <AddBankDetails {...this.props} onSubmit={this.onSubmit} /> | ||
} | ||
} | ||
|
||
export default reduxForm({ form: 'coinifyAddBankDetails' })(AddBankDetails) | ||
const mapStateToProps = (state) => ({ | ||
}) | ||
|
||
const mapDispatchToProps = (dispatch) => ({ | ||
}) | ||
|
||
export default connect(mapStateToProps, mapDispatchToProps)(AddBankDetailsContainer) |
65 changes: 65 additions & 0 deletions
65
...s/blockchain-wallet-v4-frontend/src/modals/CoinifyExchangeData/AddBankDetails/template.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
import React from 'react' | ||
import { reduxForm, Field } from 'redux-form' | ||
import { FormattedMessage } from 'react-intl' | ||
import styled from 'styled-components' | ||
import { Button, Link, Text } from 'blockchain-info-components' | ||
|
||
import { required } from 'services/FormHelper' | ||
import { flex, spacing } from 'services/StyleService' | ||
import { StepTransition } from 'components/Utilities/Stepper' | ||
import { Form, ColLeft, InputWrapper, PartnerHeader, PartnerSubHeader, ColRight, ColRightInner } from 'components/BuySell/Signup' | ||
import { TextBox } from 'components/Form' | ||
|
||
const CancelWrapper = styled.div` | ||
a { | ||
color: #545456; | ||
font-weight: 300; | ||
font-size: 14px; | ||
} | ||
` | ||
const BorderBox = styled.div` | ||
border: 1px solid ${props => props.theme['gray-1']}; | ||
padding: 30px; | ||
` | ||
|
||
const AddBankDetails = (props) => { | ||
const { invalid, submitting } = props | ||
return ( | ||
<Form> | ||
<ColLeft> | ||
<BorderBox> | ||
<InputWrapper style={spacing('mb-40')}> | ||
<PartnerHeader> | ||
<FormattedMessage id='coinifyexchangedata.addbankdetails.header' defaultMessage='Add Bank Account' /> | ||
</PartnerHeader> | ||
<PartnerSubHeader> | ||
<FormattedMessage id='coinifyexchangedata.addbankdetails.subheader' defaultMessage='Please enter your bank information below.' /> | ||
</PartnerSubHeader> | ||
<Text weight={300} size='12px'> | ||
<FormattedMessage id='coinifyexchangedata.addbankdetails.iban' defaultMessage='International Bank Account (IBAN)' /> | ||
<Field name='iban' validate={[required]} component={TextBox} /> | ||
</Text> | ||
<Text weight={300} size='12px'> | ||
<FormattedMessage id='coinifyexchangedata.addbankdetails.swift' defaultMessage='Bank Identifier Code (SWIFT/BIC)' /> | ||
<Field name='swift' validate={[required]} component={TextBox} /> | ||
</Text> | ||
</InputWrapper> | ||
</BorderBox> | ||
</ColLeft> | ||
<ColRight> | ||
<ColRightInner> | ||
<StepTransition next Component={Button} style={spacing('mt-45')} nature='primary' fullwidth disabled={submitting || invalid}> | ||
<FormattedMessage id='coinifyexchangedata.addbankdetails.continue' defaultMessage='Continue' /> | ||
</StepTransition> | ||
<CancelWrapper style={{ ...flex('row justify/center'), ...spacing('mt-15') }}> | ||
<StepTransition prev Component={Link}> | ||
<FormattedMessage id='back' defaultMessage='Back' /> | ||
</StepTransition> | ||
</CancelWrapper> | ||
</ColRightInner> | ||
</ColRight> | ||
</Form> | ||
) | ||
} | ||
|
||
export default reduxForm({ form: 'coinifyAddBankDetails' })(AddBankDetails) |
90 changes: 20 additions & 70 deletions
90
.../blockchain-wallet-v4-frontend/src/modals/CoinifyExchangeData/AddCustomerDetails/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,77 +1,27 @@ | ||
import React from 'react' | ||
import { reduxForm, Field } from 'redux-form' | ||
import { FormattedMessage } from 'react-intl' | ||
import styled from 'styled-components' | ||
import { Button, Link, Text } from 'blockchain-info-components' | ||
import { connect } from 'react-redux' | ||
import AddCustomerDetails from './template.js' | ||
|
||
import { flex, spacing } from 'services/StyleService' | ||
import { StepTransition } from 'components/Utilities/Stepper' | ||
import { Form, ColLeft, InputWrapper, PartnerHeader, PartnerSubHeader, ColRight, ColRightInner, Row } from 'components/BuySell/Signup' | ||
import { TextBox } from 'components/Form' | ||
class AddCustomerDetailsContainer extends React.PureComponent { | ||
constructor (props) { | ||
super(props) | ||
this.onSubmit = this.onSubmit.bind(this) | ||
} | ||
|
||
const CancelWrapper = styled.div` | ||
a { | ||
color: #545456; | ||
font-weight: 300; | ||
font-size: 14px; | ||
onSubmit (e) { | ||
e.preventDefault() | ||
// TODO: Store form data in the state | ||
} | ||
` | ||
const BorderBox = styled.div` | ||
border: 1px solid ${props => props.theme['gray-1']}; | ||
padding: 30px; | ||
` | ||
|
||
const AddBankDetails = (props) => { | ||
return ( | ||
<Form> | ||
<ColLeft> | ||
<BorderBox> | ||
<InputWrapper style={spacing('mb-40')}> | ||
<PartnerHeader> | ||
<FormattedMessage id='coinifyexchangedata.addcustomerdetails.header' defaultMessage='Add Bank Account' /> | ||
</PartnerHeader> | ||
<PartnerSubHeader> | ||
<FormattedMessage id='coinifyexchangedata.addcustomerdetails.subheader' defaultMessage='Who owns this bank account? This information should match the holder’s bank statement. ' /> | ||
</PartnerSubHeader> | ||
<Text weight={300} size='12px'> | ||
<FormattedMessage id='coinifyexchangedata.addcustomerdetails.fullname' defaultMessage='Account Holder’s Full Name' /> | ||
<Field component={TextBox} /> | ||
</Text> | ||
<Text weight={300} size='12px'> | ||
<FormattedMessage id='coinifyexchangedata.addcustomerdetails.street' defaultMessage='Street and Number' /> | ||
<Field component={TextBox} /> | ||
</Text> | ||
<Row> | ||
<Text weight={300} size='12px'> | ||
<FormattedMessage id='coinifyexchangedata.addcustomerdetails.city' defaultMessage='City' /> | ||
<Field component={TextBox} /> | ||
</Text> | ||
<Text weight={300} size='12px'> | ||
<FormattedMessage id='coinifyexchangedata.addcustomerdetails.postcode' defaultMessage='Postal Code' /> | ||
<Field component={TextBox} /> | ||
</Text> | ||
</Row> | ||
<Text weight={300} size='12px'> | ||
<FormattedMessage id='coinifyexchangedata.addcustomerdetails.country' defaultMessage='Country' /> | ||
<Field component={TextBox} /> | ||
</Text> | ||
</InputWrapper> | ||
</BorderBox> | ||
</ColLeft> | ||
<ColRight> | ||
<ColRightInner> | ||
<StepTransition next Component={Button} style={spacing('mt-45')} nature='primary' fullwidth> | ||
<FormattedMessage id='coinifyexchangedata.addcustomerdetails.continue' defaultMessage='Continue' /> | ||
</StepTransition> | ||
<CancelWrapper style={{ ...flex('row justify/center'), ...spacing('mt-15') }}> | ||
<StepTransition prev Component={Link}> | ||
<FormattedMessage id='back' defaultMessage='Back' /> | ||
</StepTransition> | ||
</CancelWrapper> | ||
</ColRightInner> | ||
</ColRight> | ||
</Form> | ||
) | ||
render () { | ||
return <AddCustomerDetails {...this.props} onSubmit={this.onSubmit} /> | ||
} | ||
} | ||
|
||
export default reduxForm({ form: 'coinifyAddBankDetails' })(AddBankDetails) | ||
const mapStateToProps = (state) => ({ | ||
}) | ||
|
||
const mapDispatchToProps = (dispatch) => ({ | ||
}) | ||
|
||
export default connect(mapStateToProps, mapDispatchToProps)(AddCustomerDetailsContainer) |
79 changes: 79 additions & 0 deletions
79
...ockchain-wallet-v4-frontend/src/modals/CoinifyExchangeData/AddCustomerDetails/template.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
import React from 'react' | ||
import { reduxForm, Field } from 'redux-form' | ||
import { FormattedMessage } from 'react-intl' | ||
import styled from 'styled-components' | ||
import { Button, Link, Text } from 'blockchain-info-components' | ||
|
||
import { required } from 'services/FormHelper' | ||
import { flex, spacing } from 'services/StyleService' | ||
import { StepTransition } from 'components/Utilities/Stepper' | ||
import { Form, ColLeft, InputWrapper, PartnerHeader, PartnerSubHeader, ColRight, ColRightInner, Row } from 'components/BuySell/Signup' | ||
import { SelectBoxCountry, TextBox } from 'components/Form' | ||
|
||
const CancelWrapper = styled.div` | ||
a { | ||
color: #545456; | ||
font-weight: 300; | ||
font-size: 14px; | ||
} | ||
` | ||
const BorderBox = styled.div` | ||
border: 1px solid ${props => props.theme['gray-1']}; | ||
padding: 30px; | ||
` | ||
|
||
const AddBankDetails = (props) => { | ||
const { invalid, submitting } = props | ||
return ( | ||
<Form> | ||
<ColLeft> | ||
<BorderBox> | ||
<InputWrapper style={spacing('mb-40')}> | ||
<PartnerHeader> | ||
<FormattedMessage id='coinifyexchangedata.addcustomerdetails.header' defaultMessage='Add Bank Account' /> | ||
</PartnerHeader> | ||
<PartnerSubHeader> | ||
<FormattedMessage id='coinifyexchangedata.addcustomerdetails.subheader' defaultMessage='Who owns this bank account? This information should match the holder’s bank statement. ' /> | ||
</PartnerSubHeader> | ||
<Text weight={300} size='12px'> | ||
<FormattedMessage id='coinifyexchangedata.addcustomerdetails.' defaultMessage='Account Holder’s Full Name' /> | ||
<Field name='fullname' validate={[required]} component={TextBox} /> | ||
</Text> | ||
<Text weight={300} size='12px'> | ||
<FormattedMessage id='coinifyexchangedata.addcustomerdetails.' defaultMessage='Street and Number' /> | ||
<Field name='street' validate={[required]} component={TextBox} /> | ||
</Text> | ||
<Row> | ||
<Text weight={300} size='12px'> | ||
<FormattedMessage id='coinifyexchangedata.addcustomerdetails.' defaultMessage='City' /> | ||
<Field name='city' validate={[required]} component={TextBox} /> | ||
</Text> | ||
<Text weight={300} size='12px'> | ||
<FormattedMessage id='coinifyexchangedata.addcustomerdetails.' defaultMessage='Postal Code' /> | ||
<Field name='postcode' validate={[required]} component={TextBox} /> | ||
</Text> | ||
</Row> | ||
<Text weight={300} size='12px'> | ||
<FormattedMessage id='coinifyexchangedata.addcustomerdetails.' defaultMessage='Country' /> | ||
<Field name='country' validate={[required]} component={SelectBoxCountry} /> | ||
</Text> | ||
</InputWrapper> | ||
</BorderBox> | ||
</ColLeft> | ||
<ColRight> | ||
<ColRightInner> | ||
<StepTransition next Component={Button} style={spacing('mt-45')} nature='primary' fullwidth disabled={submitting || invalid}> | ||
<FormattedMessage id='coinifyexchangedata.addcustomerdetails.continue' defaultMessage='Continue' /> | ||
</StepTransition> | ||
<CancelWrapper style={{ ...flex('row justify/center'), ...spacing('mt-15') }}> | ||
<StepTransition prev Component={Link}> | ||
<FormattedMessage id='back' defaultMessage='Back' /> | ||
</StepTransition> | ||
</CancelWrapper> | ||
</ColRightInner> | ||
</ColRight> | ||
</Form> | ||
) | ||
} | ||
|
||
export default reduxForm({ form: 'coinifyAddCustomerDetails' })(AddBankDetails) |