diff --git a/client/constants.js b/client/constants.js
index da70c015..77b3ff51 100644
--- a/client/constants.js
+++ b/client/constants.js
@@ -93,5 +93,7 @@ export const END_SKETCH_REFRESH = 'END_SKETCH_REFRESH';
export const DETECT_INFINITE_LOOPS = 'DETECT_INFINITE_LOOPS';
export const RESET_INFINITE_LOOPS = 'RESET_INFINITE_LOOPS';
+export const RESET_PASSWORD_INITIATE = 'RESET_PASSWORD_INITIATE';
+
// eventually, handle errors more specifically and better
export const ERROR = 'ERROR';
diff --git a/client/modules/IDE/components/LoginView.js b/client/modules/IDE/components/LoginView.js
index 2ec78f04..393d1acf 100644
--- a/client/modules/IDE/components/LoginView.js
+++ b/client/modules/IDE/components/LoginView.js
@@ -18,9 +18,14 @@ class LoginView extends React.Component {
+ Don't have an account? + Sign Up +
++ Forgot your password? + Reset your password +
Cancel ); @@ -42,7 +47,7 @@ function mapDispatchToProps() { function validate(formProps) { const errors = {}; if (!formProps.email) { - errors.email = 'Please enter a email'; + errors.email = 'Please enter an email'; } if (!formProps.password) { errors.password = 'Please enter a password'; diff --git a/client/modules/IDE/components/ResetPasswordForm.js b/client/modules/IDE/components/ResetPasswordForm.js new file mode 100644 index 00000000..d4c7d81a --- /dev/null +++ b/client/modules/IDE/components/ResetPasswordForm.js @@ -0,0 +1,32 @@ +import React, { PropTypes } from 'react'; + +function ResetPasswordForm(props) { + const { fields: { email }, handleSubmit, submitting, invalid, pristine } = props; + return ( + + ); +} + +ResetPassword.propTypes = { + fields: PropTypes.shape({ + email: PropTypes.object.isRequired + }).isRequired, + handleSubmit: PropTypes.func.isRequired, + initiateResetPassword: PropTypes.func.isRequired, + submitting: PropTypes.bool, + invalid: PropTypes.bool, + pristine: PropTypes.bool +} + +export default ResetPasswordForm; diff --git a/client/modules/IDE/components/ResetPasswordView.js b/client/modules/IDE/components/ResetPasswordView.js index 9f18866c..18e5c3a7 100644 --- a/client/modules/IDE/components/ResetPasswordView.js +++ b/client/modules/IDE/components/ResetPasswordView.js @@ -1,15 +1,20 @@ import React from 'react'; import { Link } from 'react-router'; +import * as UserActions from '../../User/actions'; +import { bindActionCreators } from 'redux'; +import { reduxForm } from 'redux-form'; +import ResetPasswordForm from './ResetPasswordForm'; class ResetPasswordView extends React.Component { componentDidMount() { - this.refs.forgotPassword.focus(); + this.refs.resetPassword.focus(); } render() { return ( -