From 281e8357f8a004d384e79b81081afd0db68eb191 Mon Sep 17 00:00:00 2001
From: Alex ORLUC <alex.orluc@maarch.org>
Date: Tue, 10 Mar 2020 11:55:56 +0100
Subject: [PATCH] FEAT #12091 TIME 0:30 no init panel if no gard

---
 src/frontend/app/app-routing.module.ts         |  2 +-
 src/frontend/app/app.component.ts              |  3 +++
 .../forgotPassword/forgotPassword.component.ts | 18 +++++++++++-------
 3 files changed, 15 insertions(+), 8 deletions(-)

diff --git a/src/frontend/app/app-routing.module.ts b/src/frontend/app/app-routing.module.ts
index 80e2512c44f..a0d9fd74e6b 100755
--- a/src/frontend/app/app-routing.module.ts
+++ b/src/frontend/app/app-routing.module.ts
@@ -16,7 +16,7 @@ import { IndexationComponent }              from './indexation/indexation.compon
 import { ForgotPasswordComponent }          from './login/forgotPassword/forgotPassword.component';
 import { UpdatePasswordComponent }          from './login/updatePassword/updatePassword.component';
 import { ProcessComponent }                 from './process/process.component';
-import {FollowedDocumentListComponent}      from "./home/followed-list/followed-document-list.component";
+import { FollowedDocumentListComponent }    from "./home/followed-list/followed-document-list.component";
 
 @NgModule({
     imports: [
diff --git a/src/frontend/app/app.component.ts b/src/frontend/app/app.component.ts
index 89a02731045..b44b09547ea 100755
--- a/src/frontend/app/app.component.ts
+++ b/src/frontend/app/app.component.ts
@@ -69,6 +69,9 @@ export class AppComponent {
     }
 
     ngOnInit(): void {
+
+        this.headerService.hideSideBar = true;
+        
         setTimeout(() => {
             this.headerService.sideNavLeft = this.snavLeft;
         }, 0);
diff --git a/src/frontend/app/login/forgotPassword/forgotPassword.component.ts b/src/frontend/app/login/forgotPassword/forgotPassword.component.ts
index aadd98d2fad..efb5c19076f 100644
--- a/src/frontend/app/login/forgotPassword/forgotPassword.component.ts
+++ b/src/frontend/app/login/forgotPassword/forgotPassword.component.ts
@@ -5,8 +5,9 @@ import { HttpClient } from '@angular/common/http';
 import { NotificationService } from '../../notification.service';
 import { finalize } from 'rxjs/operators';
 import { LANG } from '../../translate.component';
+import { HeaderService } from '../../../service/header.service';
 
-declare function $j(selector: any) : any;
+declare function $j(selector: any): any;
 
 @Component({
     templateUrl: 'forgotPassword.component.html',
@@ -22,15 +23,18 @@ export class ForgotPasswordComponent implements OnInit {
     };
     labelButton: string = this.lang.send;
 
-    constructor(public http: HttpClient, iconReg: MatIconRegistry, sanitizer: DomSanitizer, public notificationService: NotificationService) {
+    constructor(
+        public http: HttpClient,
+        iconReg: MatIconRegistry,
+        sanitizer: DomSanitizer,
+        public notificationService: NotificationService,
+        private headerService: HeaderService
+    ) {
         iconReg.addSvgIcon('maarchLogo', sanitizer.bypassSecurityTrustResourceUrl('static.php?filename=logo_white.svg'));
-        $j('#bodyloginCustom').remove();
-        $j('main-header').remove();
     }
 
-    ngOnInit(): void { 
-        $j('#bodyloginCustom').remove();
-        $j('main-header').remove();
+    ngOnInit(): void {
+        this.headerService.hideSideBar = true;
     }
 
     generateLink() {
-- 
GitLab