summaryrefslogtreecommitdiff
path: root/web-ui/src/account_recovery/page.js
diff options
context:
space:
mode:
authorAnike Arni <anikarni@gmail.com>2017-03-29 15:48:33 -0300
committerGitHub <noreply@github.com>2017-03-29 15:48:33 -0300
commit3616a6b950b0fb9d3e4842f90878d0beb4d5bc3f (patch)
tree5064ad57cb88df4efefbb8c75a65c0b6dc822c83 /web-ui/src/account_recovery/page.js
parent75eccfc3ea988a20919c95e892b314ccd816e7c2 (diff)
parent6daf4311d32ab64fa73292e131611ee6a38ff18a (diff)
Merge pull request #1032 from pixelated/forgot-password-page
UI improvements for account recovery flow
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 f867fcd5..3043a38b 100644
--- a/web-ui/src/account_recovery/page.js
+++ b/web-ui/src/account_recovery/page.js
@@ -40,10 +40,14 @@ export class Page extends React.Component {
this.setState({ step: this.state.step + 1 });
}
+ previousStep = () => {
+ this.setState({ step: this.state.step - 1 });
+ }
+
steps = {
0: <AdminRecoveryCodeForm next={this.nextStep} />,
- 1: <UserRecoveryCodeForm next={this.nextStep} />,
- 2: <NewPasswordForm />
+ 1: <UserRecoveryCodeForm previous={this.previousStep} next={this.nextStep} />,
+ 2: <NewPasswordForm previous={this.previousStep} />
}
mainContent = () => this.steps[this.state.step];