diff --git a/client/modules/IDE/components/NewPasswordView.jsx b/client/modules/IDE/components/NewPasswordView.jsx
deleted file mode 100644
index 7089cefc..00000000
--- a/client/modules/IDE/components/NewPasswordView.jsx
+++ /dev/null
@@ -1,74 +0,0 @@
-import React, { PropTypes } from 'react';
-import { reduxForm } from 'redux-form';
-import NewPasswordForm from './NewPasswordForm';
-import * as UserActions from '../../User/actions';
-import { bindActionCreators } from 'redux';
-import classNames from 'classnames';
-import { Link } from 'react-router';
-
-class NewPasswordView extends React.Component {
- componentDidMount() {
- this.refs.newPassword.focus();
- // need to check if this is a valid token
- this.props.validateResetPasswordToken(this.props.token);
- }
-
- render() {
- const newPasswordClass = classNames({
- 'new-password': true,
- 'new-password--invalid': this.props.user.resetPasswordInvalid
- });
- return (
-
-
Set a New Password
-
-
- The password reset token is invalid or has expired.
-
-
Close
-
- );
- }
-}
-
-NewPasswordView.propTypes = {
- token: PropTypes.string.isRequired,
- validateResetPasswordToken: PropTypes.func.isRequired,
- user: PropTypes.shape({
- resetPasswordInvalid: PropTypes.bool
- })
-};
-
-function validate(formProps) {
- const errors = {};
-
- if (!formProps.password) {
- errors.password = 'Please enter a password';
- }
- if (!formProps.confirmPassword) {
- errors.confirmPassword = 'Please enter a password confirmation';
- }
-
- if (formProps.password !== formProps.confirmPassword) {
- errors.password = 'Passwords must match';
- }
-
- return errors;
-}
-
-function mapStateToProps(state, ownProps) {
- return {
- user: state.user,
- token: ownProps.token
- };
-}
-
-function mapDispatchToProps(dispatch) {
- return bindActionCreators(UserActions, dispatch);
-}
-
-export default reduxForm({
- form: 'new-password',
- fields: ['password', 'confirmPassword'],
- validate
-}, mapStateToProps, mapDispatchToProps)(NewPasswordView);
diff --git a/client/modules/IDE/components/ResetPasswordView.jsx b/client/modules/IDE/components/ResetPasswordView.jsx
deleted file mode 100644
index 628531f0..00000000
--- a/client/modules/IDE/components/ResetPasswordView.jsx
+++ /dev/null
@@ -1,71 +0,0 @@
-import React, { PropTypes } 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';
-import classNames from 'classnames';
-
-class ResetPasswordView extends React.Component {
- componentWillMount() {
- this.props.resetPasswordReset();
- }
-
- componentDidMount() {
- this.refs.resetPassword.focus();
- }
-
- render() {
- const resetPasswordClass = classNames({
- 'reset-password': true,
- 'reset-password--submitted': this.props.user.resetPasswordInitiate
- });
- return (
-
-
Reset Your Password
-
-
- Your password reset email should arrive shortly. If you don't see it, check
- in your spam folder as sometimes it can end up there.
-
-
- Login
- or
- Sign up
-
-
Cancel
-
- );
- }
-}
-
-ResetPasswordView.propTypes = {
- resetPasswordReset: PropTypes.func.isRequired,
- user: PropTypes.shape({
- resetPasswordInitiate: PropTypes.bool
- }).isRequired,
-};
-
-function mapStateToProps(state) {
- return {
- user: state.user
- };
-}
-
-function mapDispatchToProps(dispatch) {
- return bindActionCreators(UserActions, dispatch);
-}
-
-function validate(formProps) {
- const errors = {};
- if (!formProps.email) {
- errors.email = 'Please enter an email';
- }
- return errors;
-}
-
-export default reduxForm({
- form: 'reset-password',
- fields: ['email'],
- validate
-}, mapStateToProps, mapDispatchToProps)(ResetPasswordView);
diff --git a/client/modules/IDE/pages/IDEView.jsx b/client/modules/IDE/pages/IDEView.jsx
index 3ad02193..8f9180ca 100644
--- a/client/modules/IDE/pages/IDEView.jsx
+++ b/client/modules/IDE/pages/IDEView.jsx
@@ -28,8 +28,6 @@ import SplitPane from 'react-split-pane';
import Overlay from '../../App/components/Overlay';
import SketchList from '../components/SketchList';
import About from '../components/About';
-import ResetPasswordView from '../components/ResetPasswordView';
-import NewPasswordView from '../components/NewPasswordView';
class IDEView extends React.Component {
constructor(props) {
@@ -432,26 +430,6 @@ class IDEView extends React.Component {
);
}
})()}
- {(() => { // eslint-disable-line
- if (this.props.location.pathname === '/reset-password') {
- return (
-
-
-
- );
- }
- })()}
- {(() => { // eslint-disable-line
- if (this.props.location.pathname.match(/\/reset-password\/[a-fA-F0-9]+/)) {
- return (
-
-
-
- );
- }
- })()}
{(() => { // eslint-disable-line
if (this.props.ide.forceAuthenticationVisible) {
return (
diff --git a/client/modules/User/components/LoginForm.jsx b/client/modules/User/components/LoginForm.jsx
index b5a7aa67..037f2f81 100644
--- a/client/modules/User/components/LoginForm.jsx
+++ b/client/modules/User/components/LoginForm.jsx
@@ -4,7 +4,7 @@ import { domOnlyProps } from '../../../utils/reduxFormUtils';
function LoginForm(props) {
const { fields: { email, password }, handleSubmit, submitting, pristine } = props;
return (
-
);
}
diff --git a/client/modules/User/components/SignupForm.jsx b/client/modules/User/components/SignupForm.jsx
index 07e6060b..ffc33cf6 100644
--- a/client/modules/User/components/SignupForm.jsx
+++ b/client/modules/User/components/SignupForm.jsx
@@ -4,7 +4,7 @@ import { domOnlyProps } from '../../../utils/reduxFormUtils';
function SignupForm(props) {
const { fields: { username, email, password, confirmPassword }, handleSubmit, submitting, invalid, pristine } = props;
return (
-