Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

For R2-4092: Add checkbox to opt-in to teacher emails #1149

Merged
merged 2 commits into from
Jan 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 28 additions & 16 deletions src/components/registration/steps.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -870,23 +870,35 @@ module.exports = {
</p>
<Card>
<Form onValidSubmit={this.onValidSubmit}>
<Input label={formatMessage({id: 'general.emailAddress'})}
type="text"
name="user.email"
validations="isEmail"
validationError={formatMessage({id: 'general.validationEmail'})}
required />
<Input label={formatMessage({id: 'general.confirmEmail'})}
type="text"
name="confirmEmail"
validations="equalsField:user.email"
validationErrors={{
equalsField: formatMessage({id: 'general.validationEmailMatch'})
}}
required />
<Input

This comment was marked as abuse.

This comment was marked as abuse.

label={formatMessage({id: 'general.emailAddress'})}
type="text"
name="user.email"
validations="isEmail"
validationError={formatMessage({id: 'general.validationEmail'})}
required
/>
<Input
label={formatMessage({id: 'general.confirmEmail'})}
type="text"
name="confirmEmail"
validations="equalsField:user.email"
validationErrors={{
equalsField: formatMessage({id: 'general.validationEmailMatch'})
}}
required
/>
<Checkbox
label={formatMessage({id: 'registration.optIn'})}
value={true}
help={null}
name="subscribe"
/>
<GeneralError name="all" />
<NextStepButton waiting={this.props.waiting}
text={<intl.FormattedMessage id="registration.nextStep" />} />
<NextStepButton
waiting={this.props.waiting}
text={<intl.FormattedMessage id="registration.nextStep" />}
/>
</Form>
</Card>
<StepNavigation steps={this.props.totalSteps - 1} active={this.props.activeStep} />
Expand Down
1 change: 1 addition & 0 deletions src/l10n.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
"registration.newPassword": "New Password",
"registration.nextStep": "Next Step",
"registration.notYou": "Not you? Log in as another user",
"registration.optIn": "Send me updates on using Scratch in educational settings",
"registration.personalStepTitle": "Personal Information",
"registration.personalStepDescription": "Your individual responses will not be displayed publicly, and will be kept confidential and secure",
"registration.selectCountry": "select country",
Expand Down
1 change: 1 addition & 0 deletions src/views/teacherregistration/teacherregistration.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ var TeacherRegistration = intl.injectIntl(React.createClass({
this.state.formData.user.gender
),
country: this.state.formData.user.country,
subscribe: formData.subscribe,
is_robot: this.state.formData.user.isRobot,
first_name: this.state.formData.user.name.first,
last_name: this.state.formData.user.name.last,
Expand Down