<h1 mat-dialog-title>Zápis z kurzu</h1>
<div mat-dialog-content>
  <form #editReportForm="ngForm">
    <div class="description-wrapper">
        <mat-form-field appearance="outline">
            <mat-label>Zápis</mat-label>
            <textarea matInput required maxUtf8Length="2000" [(ngModel)]="reportText" name="report" #report="ngModel" placeholder=""></textarea>
        </mat-form-field>
        <span *ngIf="report.invalid && report.touched" class="form-error">
            <span *ngIf="report.errors != null">  
                <span *ngIf="report.errors.required" matTooltip="Text nebyl vyplněno">
                    <mat-icon aria-hidden="false" aria-label="Example home icon">error_outline</mat-icon>
                </span>
                <span *ngIf="report.errors.utfLength" class="form-error" matTooltip="{{report.errors.actualLength | utfLengthError: report.errors.maxAllowed}}"> 
                  <mat-icon aria-hidden="false" aria-label="Example home icon">error_outline</mat-icon>
              </span>
            </span>
        </span>
    </div>
  </form>  
</div>
<div mat-dialog-actions>
  <button mat-raised-button color="accent" (click)="close()">Zrušit</button>
  <button mat-raised-button color="primary" [mat-dialog-close]="reportText" cdkFocusInitial [disabled]="editReportForm.invalid"
            matTooltip="Formulář není správně vyplněn" [matTooltipDisabled]="editReportForm.valid">
    Uložit
  </button>
</div>
