summaryrefslogtreecommitdiff
path: root/web-ui/src/account_recovery/page.js
diff options
context:
space:
mode:
authorSriram Viswanathan <sriramv@thoughtworks.com>2017-04-04 17:57:48 -0300
committerSriram Viswanathan <sriramv@thoughtworks.com>2017-04-04 17:57:48 -0300
commit50d64627a924234ef5858b82bee8c9c33fb08f09 (patch)
treef2af020cd63976db53c8d2325b2b9ba4beb6063e /web-ui/src/account_recovery/page.js
parent92523b7c8ceb8f3b7adf282e1b9e573ce5b37f04 (diff)
[#938] Adds backup account step to forgot password flow
with @anikarni
Diffstat (limited to 'web-ui/src/account_recovery/page.js')
-rw-r--r--web-ui/src/account_recovery/page.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/web-ui/src/account_recovery/page.js b/web-ui/src/account_recovery/page.js
index 2d33e2fb..89441d26 100644
--- a/web-ui/src/account_recovery/page.js
+++ b/web-ui/src/account_recovery/page.js
@@ -22,6 +22,7 @@ import Header from 'src/common/header/header';
import AdminRecoveryCodeForm from 'src/account_recovery/admin_recovery_code_form/admin_recovery_code_form';
import UserRecoveryCodeForm from 'src/account_recovery/user_recovery_code_form/user_recovery_code_form';
import NewPasswordForm from 'src/account_recovery/new_password_form/new_password_form';
+import BackupAccountStep from 'src/account_recovery/backup_account_step/backup_account_step';
import Footer from 'src/common/footer/footer';
import 'font-awesome/scss/font-awesome.scss';
@@ -36,7 +37,9 @@ export class Page extends React.Component {
}
nextStep = (event) => {
- event.preventDefault();
+ if (event) {
+ event.preventDefault();
+ }
this.setState({ step: this.state.step + 1 });
}
@@ -53,7 +56,8 @@ export class Page extends React.Component {
1: (<UserRecoveryCodeForm
previous={this.previousStep} next={this.nextStep} saveCode={this.saveUserCode}
/>),
- 2: <NewPasswordForm previous={this.previousStep} userCode={this.state.userCode} />
+ 2: <NewPasswordForm previous={this.previousStep} userCode={this.state.userCode} next={this.nextStep} />,
+ 3: <BackupAccountStep />
})
mainContent = () => this.steps()[this.state.step];