]>
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'] }" | |
7 | (keyup.control.enter)="formValidated()" (keyup.meta.enter)="formValidated()" #textarea> | |
8 | ||
9 | </textarea> | |
10 | <div *ngIf="formErrors.text" class="form-error"> | |
11 | {{ formErrors.text }} | |
12 | </div> | |
13 | </div> | |
14 | </div> | |
15 | ||
16 | <div class="submit-comment"> | |
17 | <button *ngIf="isAddButtonDisplayed()" [ngClass]="{ disabled: !form.valid }"> | |
18 | Post comment | |
19 | </button> | |
20 | </div> | |
21 | </form> |