| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| |
| <div layout="column" layout-fill> |
| <div class="mat-content" layout-padding flex> |
| <div layout-gt-xs="row" layout-align-gt-xs="center start" class="margin"> |
| <div flex-gt-xs="25" layout-align="center center"> |
| <mat-card> |
| <mat-card-title translate>Change password</mat-card-title> |
| <mat-card-subtitle *ngIf="forced" translate>please change your password in order to access fims</mat-card-subtitle> |
| <mat-card-content> |
| <form [formGroup]="passwordForm" layout-align="center center" layout-margin> |
| <div layout="row"> |
| <mat-form-field layout-margin flex> |
| <input matInput placeholder="{{'New Password' | translate}}" type="password" formControlName="newPassword" autocomplete="new-password"/> |
| <mat-error *ngIf="passwordForm.get('newPassword').hasError('required')" translate> |
| Required |
| </mat-error> |
| <mat-error *ngIf="passwordForm.get('newPassword').hasError('minlength')"> |
| {{ 'Must have at least characters.' | translate:{ value: passwordForm.get('newPassword').getError('minlength')['requiredLength']} }} |
| </mat-error> |
| </mat-form-field> |
| </div> |
| <div layout="row"> |
| <mat-form-field layout-margin flex> |
| <input matInput placeholder="{{'Confirm New Password' | translate}}" type="password" formControlName="confirmNewPassword" autocomplete="new-password"/> |
| <mat-error *ngIf="passwordForm.get('confirmNewPassword').hasError('required')" translate> |
| Required |
| </mat-error> |
| </mat-form-field> |
| </div> |
| <div layout="row"> |
| <span *ngIf="passwordForm.hasError('mismatch')" layout-margin class="tc-red-700" translate> |
| Passwords must match. |
| </span> |
| <span *ngIf="error" layout-margin class="tc-red-700">{{error | translate}}</span> |
| </div> |
| </form> |
| </mat-card-content> |
| <mat-card-actions> |
| <button flex mat-raised-button color="primary" [disabled]="passwordForm.invalid" (click)="changePassword()">{{'Change password' | translate}}</button> |
| </mat-card-actions> |
| </mat-card> |
| </div> |
| </div> |
| </div> |
| </div> |