+ )
+ }
+
+ askResetPassword () {
+ this.userService.askResetPassword(this.forgotPasswordEmail)
+ .subscribe(
+ res => {
+ const message = this.i18n(
+ 'An email with the reset password instructions will be sent to {{email}}.',
+ { email: this.forgotPasswordEmail }
+ )
+ this.notificationsService.success(this.i18n('Success'), message)
+ this.hideForgotPasswordModal()
+ },
+
+ err => this.notificationsService.error(this.i18n('Error'), err.message)
+ )
+ }
+
+ onForgotPasswordModalShown () {
+ this.forgotPasswordEmailInput.nativeElement.focus()
+ }
+
+ openForgotPasswordModal () {
+ this.forgotPasswordModal.show()
+ }
+
+ hideForgotPasswordModal () {
+ this.forgotPasswordModal.hide()