Skip to content

Commit

Permalink
fix(OrderForm): move newsletterOptIn field to below 'Contribute as' f…
Browse files Browse the repository at this point in the history
…ield
  • Loading branch information
HipsterBrown committed May 17, 2018
1 parent 2652470 commit 4bc1173
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions src/components/OrderForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,6 @@ class OrderForm extends React.Component {
name: 'description',
maxLength: 255
},
{
name: 'newsletterOptIn',
type: 'checkbox',
help: 'Receive our monthly newsletter with updates about new collectives and features. Stay in the know with the latest sponsor and backer funding leaderboard, open source inspiration, and upcoming events.',
},
]

this.fields = this.fields.map(field => {
Expand Down Expand Up @@ -661,7 +656,7 @@ class OrderForm extends React.Component {
{...field}
defaultValue={this.state.user[field.name]}
onChange={(value) => this.handleChange("user", field.name, value)}
/>
/>
</Col>
</Row>
))}
Expand All @@ -674,9 +669,25 @@ class OrderForm extends React.Component {
name="fromCollectiveSelector"
onChange={CollectiveId => this.selectProfile(CollectiveId)}
options={this.fromCollectiveOptions}
/>
/>
}

{ !LoggedInUser && this.state.isNewUser && (
<Row key="newsletterOptIn.input">
<Col sm={12}>
<InputField
className="horizontal"
name="newsletterOptIn"
type="checkbox"
help="Receive our monthly newsletter with updates about new collectives and features. Stay in the know with the latest sponsor and backer funding leaderboard, open source inspiration, and upcoming events."
description={intl.formatMessage(this.messages['newsletterOptIn.description'])}
defaultValue={this.state.user['newsletterOptIn']}
onChange={(value) => this.handleChange('user', 'newsletterOptIn', value)}
/>
</Col>
</Row>
)}

</section>

{ !fromCollective.id && this.state.orgDetails.show &&
Expand Down

0 comments on commit 4bc1173

Please sign in to comment.