From f8de61f0673f69b46304a801755a9e304fe33cb3 Mon Sep 17 00:00:00 2001 From: Matthew Taylor Date: Fri, 12 Aug 2016 10:11:14 -0400 Subject: [PATCH] Update from feedback use props for username rather than constructed form data, and `studentUsername -> username`. Thanks @rschamp! --- src/components/registration/steps.jsx | 10 +++------- .../studentcompleteregistration.jsx | 5 +---- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/components/registration/steps.jsx b/src/components/registration/steps.jsx index dbf643afc..2b97a4dca 100644 --- a/src/components/registration/steps.jsx +++ b/src/components/registration/steps.jsx @@ -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; diff --git a/src/views/studentcompleteregistration/studentcompleteregistration.jsx b/src/views/studentcompleteregistration/studentcompleteregistration.jsx index 6b682c7ff..e8d429d54 100644 --- a/src/views/studentcompleteregistration/studentcompleteregistration.jsx +++ b/src/views/studentcompleteregistration/studentcompleteregistration.jsx @@ -133,10 +133,7 @@ var StudentCompleteRegistration = intl.injectIntl(React.createClass({ + username={this.props.studentUsername} /> : [] }