<!--<ion-header class="header-subpage" no-border>
  <ion-toolbar>
    <ion-title class="titolo-sezione-head">{{ 'change_password' | translate }}</ion-title>
  </ion-toolbar>
</ion-header>-->

  
<ion-content>
  <ion-grid class="transparent bc-grid">
    <ion-row class="transparent">
      <ion-col align-self-end size-md="6" size-lg="6" size-xs="12" class="transparent">
        <div class="body-form body-img12">
          <ion-row justify-content-center *ngIf="platform.is('desktop')">
            <ion-col>
              <ion-buttons class="back-button-desktop-cp" (click)="back()" title="{{ 'back_login' | translate }}">
                <ion-icon name="arrow-round-back" color="#2b94d1" class="back" tappable></ion-icon>
                <!--<ion-icon name="arrow-dropleft-circle" color="#2b94d1" class="back"></ion-icon>-->
              </ion-buttons>
            </ion-col>
            <ion-col>
              <!--<div class="change-title bc-title">
                {{ 'change_password' | translate }}
              </div>-->
              <div class="documenti-title">
                <ion-title>{{ 'change_password' | translate }}</ion-title>
              </div>
            </ion-col>
            <ion-col></ion-col>
         </ion-row>
          <form #form="ngForm" (ngSubmit)="change(form)" [formGroup]="matching_passwords_group">
            <ion-grid>
              <ion-row color="primary" justify-content-center>
                  <ion-col>
                  <div padding>
                    <ion-item>
                      <ion-input formControlName="oldpassword" type="password" placeholder="{{ 'old_pwd' | translate }}" ngModel required></ion-input>
                    </ion-item>
                    <ion-item>
                      <ion-input formControlName="newpassword" type="password" placeholder="{{ 'new_pwd' | translate }}" ngModel required></ion-input>
                    </ion-item>
                    <ion-item>
                      <ion-input formControlName="newpasswordbis" type="password" placeholder="{{ 'repeat_new_pwd' | translate }}" ngModel required></ion-input>
                    </ion-item>
                  </div>
                  <div padding>
                    <ion-button type="submit" [disabled]="form.invalid" class="bc-invia">{{ 'change_password' | translate }}</ion-button>
                  </div>
                </ion-col>
              </ion-row>
              <ion-row color="primary" justify-content-center>
                <div class="validation-errors" justify-content-center>
                  <ng-container *ngFor="let validation of validation_messages.newpassword">
                    <div class="error-message" *ngIf="matching_passwords_group.get('newpassword').hasError(validation.type) && (matching_passwords_group.get('newpassword').dirty 
                    || matching_passwords_group.get('newpassword').touched)">
                      {{ validation.message }}
                    </div>
                  </ng-container>
                  <ng-container *ngFor="let validation of validation_messages.newpasswordbis">
                    <div class="error-message" *ngIf="matching_passwords_group.get('newpasswordbis').hasError(validation.type) && (matching_passwords_group.get('newpasswordbis').dirty 
                    || matching_passwords_group.get('newpasswordbis').touched)">
                      {{ validation.message }}
                    </div>
                  </ng-container>
                  <ng-container *ngFor="let validation of validation_messages.newpasswordbis">
                    <div class="error-message" *ngIf="matching_passwords_group.hasError('areEqual')">
                      {{ validation.message }}
                    </div>
                  </ng-container>
                </div>
              </ion-row>
            </ion-grid>
          </form>
        </div>
      </ion-col>
      <ion-col align-self-end size-md="6" size-lg="6" size-xs="12">
        <div class="body-blue2"></div>
        <div class="body-img22"></div>
      </ion-col>
    </ion-row>
  </ion-grid>
</ion-content>