<form appFormSubmit (ngSubmit)="objectController.actionCallback(primaryAction)"
      [formGroup]="confirmEmailForm" class="fl-content">
  <app-form-errors #formErrors [formGroup]="confirmEmailForm"></app-form-errors>
  <p class="fl-detail" i18n>
    Check your email account and click on the link to confirm the email address or fill in the
    confirmation code received in the email.
  </p>
  <p class="fl-green-color fl-detail" *ngIf="resendMessage">{{resendMessage}}</p>
  <mat-form-field class="full-width fl-margin-top-medium">
    <mat-label i18n>Confirmation code</mat-label>
    <input matInput placeholder="Confirmation code" i18n-placeholder type="text"
           formControlName="confirmation_code" required>
    <mat-error>{{fieldErrors['confirmation_code']}}</mat-error>
  </mat-form-field>
</form>

<div layoutAlign="end" appLayoutGap="10px">
  <a mat-button [routerLink]="config.getPanelUrl('user/profile/edit')" i18n>
    Change email
  </a>
  <button mat-button (click)="resendCode()" i18n>
    Resend code
  </button>
  <button mat-button color="primary" (click)="confirmEmail()" i18n>Confirm email</button>
</div>
