aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/login/login.component.ts
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/login/login.component.ts')
-rw-r--r--client/src/app/login/login.component.ts11
1 files changed, 7 insertions, 4 deletions
diff --git a/client/src/app/login/login.component.ts b/client/src/app/login/login.component.ts
index 9a68c12fa..8e8822510 100644
--- a/client/src/app/login/login.component.ts
+++ b/client/src/app/login/login.component.ts
@@ -2,12 +2,12 @@ import { Component, ElementRef, OnInit, ViewChild } from '@angular/core'
2import { RedirectService, ServerService } from '@app/core' 2import { RedirectService, ServerService } from '@app/core'
3import { UserService } from '@app/shared' 3import { UserService } from '@app/shared'
4import { NotificationsService } from 'angular2-notifications' 4import { NotificationsService } from 'angular2-notifications'
5import { ModalDirective } from 'ngx-bootstrap/modal'
6import { AuthService } from '../core' 5import { AuthService } from '../core'
7import { FormReactive } from '../shared' 6import { FormReactive } from '../shared'
8import { I18n } from '@ngx-translate/i18n-polyfill' 7import { I18n } from '@ngx-translate/i18n-polyfill'
9import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service' 8import { FormValidatorService } from '@app/shared/forms/form-validators/form-validator.service'
10import { LoginValidatorsService } from '@app/shared/forms/form-validators/login-validators.service' 9import { LoginValidatorsService } from '@app/shared/forms/form-validators/login-validators.service'
10import { NgbModal, NgbModalRef } from '@ng-bootstrap/ng-bootstrap'
11 11
12@Component({ 12@Component({
13 selector: 'my-login', 13 selector: 'my-login',
@@ -16,14 +16,17 @@ import { LoginValidatorsService } from '@app/shared/forms/form-validators/login-
16}) 16})
17 17
18export class LoginComponent extends FormReactive implements OnInit { 18export class LoginComponent extends FormReactive implements OnInit {
19 @ViewChild('forgotPasswordModal') forgotPasswordModal: ModalDirective 19 @ViewChild('forgotPasswordModal') forgotPasswordModal: ElementRef
20 @ViewChild('forgotPasswordEmailInput') forgotPasswordEmailInput: ElementRef 20 @ViewChild('forgotPasswordEmailInput') forgotPasswordEmailInput: ElementRef
21 21
22 error: string = null 22 error: string = null
23 forgotPasswordEmail = '' 23 forgotPasswordEmail = ''
24 24
25 private openedForgotPasswordModal: NgbModalRef
26
25 constructor ( 27 constructor (
26 protected formValidatorService: FormValidatorService, 28 protected formValidatorService: FormValidatorService,
29 private modalService: NgbModal,
27 private loginValidatorsService: LoginValidatorsService, 30 private loginValidatorsService: LoginValidatorsService,
28 private authService: AuthService, 31 private authService: AuthService,
29 private userService: UserService, 32 private userService: UserService,
@@ -84,10 +87,10 @@ export class LoginComponent extends FormReactive implements OnInit {
84 } 87 }
85 88
86 openForgotPasswordModal () { 89 openForgotPasswordModal () {
87 this.forgotPasswordModal.show() 90 this.openedForgotPasswordModal = this.modalService.open(this.forgotPasswordModal)
88 } 91 }
89 92
90 hideForgotPasswordModal () { 93 hideForgotPasswordModal () {
91 this.forgotPasswordModal.hide() 94 this.openedForgotPasswordModal.close()
92 } 95 }
93} 96}