Commit f8de61f0 authored by Matthew Taylor's avatar Matthew Taylor

Update from feedback

use props for username rather than constructed form data, and `studentUsername -> username`. Thanks @rschamp!
parent cbf76ec6
......@@ -226,7 +226,7 @@ module.exports = {
ChoosePasswordStep: intl.injectIntl(React.createClass({
getDefaultProps: function () {
return {
studentUsername: null,
username: null,
showPassword: false,
waiting: false
};
......@@ -258,7 +258,7 @@ module.exports = {
validations={{
minLength: 6,
notEquals: 'password',
notEqualsUsername: this.props.studentUsername
notEqualsUsername: this.props.username
}}
validationErrors={{
minLength: formatMessage({
......@@ -880,11 +880,7 @@ module.exports = {
};
},
onNextStep: function () {
this.props.onNextStep({
user: {
username: this.props.studentUsername
}
});
this.props.onNextStep();
},
render: function () {
var formatMessage = this.props.intl.formatMessage;
......
......@@ -133,10 +133,7 @@ var StudentCompleteRegistration = intl.injectIntl(React.createClass({
<Steps.ChoosePasswordStep onNextStep={this.advanceStep}
showPassword={true}
waiting={this.state.waiting}
studentUsername={
this.state.formData.user &&
this.state.formData.user.username
} />
username={this.props.studentUsername} />
:
[]
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment