]>
Commit | Line | Data |
---|---|---|
1 | <form novalidate [formGroup]="form" (ngSubmit)="formValidated()"> | |
2 | <div class="avatar-and-textarea"> | |
3 | <img [src]="getUserAvatarUrl()" alt="Avatar" /> | |
4 | ||
5 | <div class="form-group"> | |
6 | <textarea placeholder="Add comment..." formControlName="text" [ngClass]="{ 'input-error': formErrors['text'] }" #textarea> | |
7 | ||
8 | </textarea> | |
9 | <div *ngIf="formErrors.text" class="form-error"> | |
10 | {{ formErrors.text }} | |
11 | </div> | |
12 | </div> | |
13 | </div> | |
14 | ||
15 | <div class="submit-comment"> | |
16 | <button *ngIf="isAddButtonDisplayed()" [ngClass]="{ disabled: !form.valid }"> | |
17 | Post comment | |
18 | </button> | |
19 | </div> | |
20 | </form> |