diff options
author | Anike Arni <aarni@thoughtworks.com> | 2017-03-28 15:33:55 -0300 |
---|---|---|
committer | Anike Arni <aarni@thoughtworks.com> | 2017-03-28 18:06:41 -0300 |
commit | 1ec36fb45d48cadd98ec7188414fa6de4d9455ad (patch) | |
tree | ab683719ccbe6a09de4fd1058009b148ec2d0f40 /web-ui/src/account_recovery/page.js | |
parent | 9f0b66ae8fa5daac158f7c74919c0636882a550f (diff) |
[#932] Adds back link to account recovery steps
Diffstat (limited to 'web-ui/src/account_recovery/page.js')
-rw-r--r-- | web-ui/src/account_recovery/page.js | 8 |
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]; |