summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher De Cairos <cade@mozillafoundation.org>2015-07-08 09:41:46 -0400
committerChristopher De Cairos <cade@mozillafoundation.org>2015-07-08 09:41:46 -0400
commitcf9e62c712e4179b30eae29dcff9f7d8d83b28d0 (patch)
tree6248c25d4590515df7778cb5d99bc5571aa6366d
parent9df247d3c87c719556402d6b2a9b5a5deb2a1a27 (diff)
Revert "Fix issue #317 - Change from username to email for password recovery …"revert-331-issue317
-rw-r--r--templates/components/request-reset-view.jsx12
-rw-r--r--templates/pages/login.jsx2
-rw-r--r--templates/pages/reset-password.jsx2
3 files changed, 9 insertions, 7 deletions
diff --git a/templates/components/request-reset-view.jsx b/templates/components/request-reset-view.jsx
index 5bcef69..2f6411d 100644
--- a/templates/components/request-reset-view.jsx
+++ b/templates/components/request-reset-view.jsx
@@ -8,10 +8,10 @@ var API = require('../lib/api.jsx');
var fields = [
{
- 'email': {
- 'placeholder': 'Email',
+ 'username': {
+ 'placeholder': 'Username',
'type': 'text',
- 'validator': 'email'
+ 'validator': 'username'
}
}
];
@@ -31,9 +31,11 @@ var RequestResetPassword = React.createClass({
WebmakerActions.deleteListener('FORM_VALIDATION', this.handleFormData);
},
render: function() {
+ var username = this.getQuery().username;
return (
<div className="requestPassword innerForm centerDiv">
- <Form onInputBlur={this.handleBlur}
+ <Form defaultUsername={username}
+ onInputBlur={this.handleBlur}
origin="Reset Password"
ref="userform"
fields={fields}
@@ -47,7 +49,7 @@ var RequestResetPassword = React.createClass({
this.props.submitForm(data);
},
handleBlur: function(fieldName, value) {
- if ( fieldName === 'email' && value ) {
+ if ( fieldName === 'username' && value ) {
this.checkUsername(value);
}
},
diff --git a/templates/pages/login.jsx b/templates/pages/login.jsx
index e265a16..596ae9a 100644
--- a/templates/pages/login.jsx
+++ b/templates/pages/login.jsx
@@ -67,7 +67,7 @@ var Login = React.createClass({
defaultUsername={this.queryObj.username}
/>
<button onClick={this.processFormData} className="btn btn-awsm">{buttonText}</button>
- <Link onClick={this.handleGA.bind(this, 'Forgot your password')} to="reset-password" className="need-help">Forgot your password?</Link>
+ <Link onClick={this.handleGA.bind(this, 'Forgot your password')} to="reset-password" query={this.queryObj} className="need-help">Forgot your password?</Link>
</div>
</div>
);
diff --git a/templates/pages/reset-password.jsx b/templates/pages/reset-password.jsx
index 945f4d9..febdbde 100644
--- a/templates/pages/reset-password.jsx
+++ b/templates/pages/reset-password.jsx
@@ -124,7 +124,7 @@ var ResetPassword = React.createClass({
'X-CSRF-Token': csrfToken
},
body: JSON.stringify({
- uid: data.email,
+ uid: data.username,
oauth: Url.parse(window.location.href, true).query
})
}).then(function(response) {
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback