summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher De Cairos <cade@mozillafoundation.org>2015-08-24 16:30:54 -0400
committerChristopher De Cairos <cade@mozillafoundation.org>2015-08-24 16:30:54 -0400
commit88eb045b705b6dcd238c18ff3137de3a8cfb04cc (patch)
treebaef7e18c311d9b8493e7d02bbc8c6e55d90f06f
parent298413db44c267f820582dbb11fa3d2e1fd3b72e (diff)
use conditional expression to assign a value in reset-password.jsx
-rw-r--r--templates/pages/reset-password.jsx43
1 files changed, 23 insertions, 20 deletions
diff --git a/templates/pages/reset-password.jsx b/templates/pages/reset-password.jsx
index f6e7d4b..a78cbd3 100644
--- a/templates/pages/reset-password.jsx
+++ b/templates/pages/reset-password.jsx
@@ -29,39 +29,42 @@ var ResetPassword = React.createClass({
render: function() {
var emailText = "We've emailed you instructions for creating a new password.";
var linkQuery = {};
+ var content;
+
linkQuery.client_id = this.state.queryObj.client_id;
linkQuery.state = this.state.queryObj.state;
linkQuery.scopes = this.state.queryObj.scopes;
linkQuery.response_type = this.state.queryObj.response_type;
- var content = (
- <div className="resetPasswordPage">
- {!this.state.submitForm && !this.state.email ?
- <RequestView submitForm={this.handleResetPassword}/> : false
- }
-
- {this.state.submitForm ?
- <IconText
- iconClass="emailSentIcon fa fa-envelope-o"
- className="emailSent centerDiv"
- headerClass="emailSentHeader"
- header="Check your email">
- <p>{emailText}</p>
- </IconText> : false}
- {this.state.email ?
- <ResetView username={this.state.queryObj.uid} submitForm={this.handleRequestPassword}/> : false
- }
- </div>
- );
-
if (this.state.resetSuccess) {
content = (
<div className="centerDiv smallWrapper">
<PasswordResetSuccess android="true"/>
</div>
);
+ } else {
+ content = (
+ <div className="resetPasswordPage">
+ {!this.state.submitForm && !this.state.email ?
+ <RequestView submitForm={this.handleResetPassword}/> : false
+ }
+
+ {this.state.submitForm ?
+ <IconText
+ iconClass="emailSentIcon fa fa-envelope-o"
+ className="emailSent centerDiv"
+ headerClass="emailSentHeader"
+ header="Check your email">
+ <p>{emailText}</p>
+ </IconText> : false}
+ {this.state.email ?
+ <ResetView username={this.state.queryObj.uid} submitForm={this.handleRequestPassword}/> : false
+ }
+ </div>
+ );
}
+
return (
<div>
<Header origin="Reset Password" className="desktopHeader" redirectQuery={linkQuery} />
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback