Skip to content
Snippets Groups Projects
Commit e0330785 authored by Alex ORLUC's avatar Alex ORLUC
Browse files

FIX #15753 TIME 0:35 fix update password page

parent b564b895
No related branches found
No related tags found
No related merge requests found
......@@ -57,6 +57,8 @@ export class AppComponent {
}
allowedRoute() {
return ['/', '/login', '/forgot-password', '/update-password', '/password-modification'].indexOf(this.router.url) === -1;
const route = this.router.url.split('?')[0];
return ['/', '/login', '/forgot-password', '/update-password', '/password-modification'].indexOf(route) === -1;
}
}
......@@ -9,17 +9,21 @@
</ion-item>
<ion-item>
<ion-label position="floating">{{'lang.password' | translate}}</ion-label>
<ion-input name="password" matInput type="password" formControlName="password" (keyup.enter)="onSubmit()"></ion-input>
<ion-input name="password" matInput type="password" formControlName="password"
(keyup.enter)="onSubmit()"></ion-input>
</ion-item>
<a routerLink="/forgot-password" *ngIf="authService.authMode === 'default'"
class="forgot-password">{{'lang.forgotPassword' | translate}}</a>
<a href="" *ngIf="authService.authMode === 'ldap'"
class="forgot-password">{{'lang.ldapEnabled' | translate}}</a>
<a href="" *ngIf="authService.authMode === 'kerberos'"
class="forgot-password">{{'lang.kerberosEnabled' | translate}}</a>
<a href="" *ngIf="authService.authMode === 'x509'"
class="forgot-password">{{'lang.x509Enabled' | translate}}</a>
<ion-button type="submit" expand="block" [disabled]="loginForm.invalid || loading">{{'lang.connect' | translate}}
<div class="connection-type">
<a routerLink="/forgot-password" *ngIf="authService.authMode === 'default'"
class="forgot-password">{{'lang.forgotPassword' | translate}}</a>
<a href="" *ngIf="authService.authMode === 'ldap'"
class="forgot-password">{{'lang.ldapEnabled' | translate}}</a>
<a href="" *ngIf="authService.authMode === 'kerberos'"
class="forgot-password">{{'lang.kerberosEnabled' | translate}}</a>
<a href="" *ngIf="authService.authMode === 'x509'"
class="forgot-password">{{'lang.x509Enabled' | translate}}</a>
</div>
<ion-button type="submit" expand="block" [disabled]="loginForm.invalid || loading">
{{'lang.connect' | translate}}
</ion-button>
</form>
</ion-card-content>
......
......@@ -21,4 +21,9 @@
.forgot-password {
display: block;
text-align: right;
}
.connection-type {
display: flex;
justify-content: end;
}
\ No newline at end of file
......@@ -56,7 +56,7 @@
<ion-label style="font-size: 13px;">{{labelButton | translate}}</ion-label>
</ion-button>
<ion-button type="button" shape="round" size="large" fill="outline" color="medium"
[disabled]="allowValidate() || loading" routerLink="/login">
routerLink="/login">
<ion-label style="font-size: 13px;">{{'lang.cancel' | translate}}</ion-label>
</ion-button>
</div>
......
@import '../../../css/vars.scss';
.login-content {
background-color: $primary;
height: 100vh;
width: 100vw;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.login-form {
max-width: 600px;
text-align: center;
......@@ -37,3 +25,8 @@ footer {
font-size: 10px;
opacity: 0.5;
}
.showpassButton {
--background: none;
--box-shadow: none;
}
\ No newline at end of file
......@@ -6,6 +6,7 @@ import { Router, ActivatedRoute } from '@angular/router';
import { NotificationService } from '../../service/notification.service';
import { TranslateService } from '@ngx-translate/core';
import { finalize } from 'rxjs/operators';
import { MenuController } from '@ionic/angular';
@Component({
templateUrl: 'updatePassword.component.html',
......@@ -46,7 +47,16 @@ export class UpdatePasswordComponent implements OnInit {
otherRuleText = '';
constructor(private translate: TranslateService, private router: Router, private route: ActivatedRoute, public http: HttpClient, iconReg: MatIconRegistry, sanitizer: DomSanitizer, public notificationService: NotificationService) {
constructor(
private translate: TranslateService,
private router: Router,
private route: ActivatedRoute,
public http: HttpClient,
iconReg: MatIconRegistry,
sanitizer: DomSanitizer,
public notificationService: NotificationService,
private menu: MenuController,
) {
iconReg.addSvgIcon('maarchLogo', sanitizer.bypassSecurityTrustResourceUrl('../src/frontend/assets/logo_white.svg'));
this.route.queryParams
.subscribe(params => {
......@@ -56,6 +66,11 @@ export class UpdatePasswordComponent implements OnInit {
ngOnInit(): void { }
ionViewWillEnter() {
this.menu.enable(false, 'left-menu');
this.menu.enable(false, 'right-menu');
}
updatePassword() {
this.labelButton = 'lang.sending';
this.loading = true;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment