<h1 mat-dialog-title>Hodnocení instruktora {{name}}</h1>
<div mat-dialog-content>
  <form #editEvaluationForm="ngForm">
    <div class="description-wrapper">
        <mat-form-field appearance="outline">
            <mat-label>Text hodnocení</mat-label>
            <textarea matInput required maxUtf8Length="1000" [(ngModel)]="evaluation.description" name="description" #description="ngModel" placeholder=""></textarea>
        </mat-form-field>
        <span *ngIf="description.invalid && description.touched" class="form-error">
            <span *ngIf="description.errors != null">  
                <span *ngIf="description.errors.required" matTooltip="Hondocení nebylo vyplněno">
                    <mat-icon aria-hidden="false" aria-label="Example home icon">error_outline</mat-icon>
                </span>
                <span *ngIf="description.errors.utfLength" class="form-error" matTooltip="{{description.errors.actualLength | utfLengthError: description.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]="evaluation" cdkFocusInitial [disabled]="editEvaluationForm.invalid"
            matTooltip="Formulář není správně vyplněn" [matTooltipDisabled]="editEvaluationForm.valid">
    Uložit
  </button>
</div>
