diff options
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]; |