aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/videos/+video-watch/comment/video-comment-add.component.html
blob: f65a88d201e3e2512f6ca56e4af1f087268000cb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<form novalidate [formGroup]="form" (ngSubmit)="formValidated()">
  <div class="avatar-and-textarea">
    <img [src]="user.accountAvatarUrl" alt="Avatar" />

    <div class="form-group">
      <textarea i18n-placeholder placeholder="Add comment..." autosize
                formControlName="text" [ngClass]="{ 'input-error': formErrors['text'] }"
                (keyup.control.enter)="onValidKey()" (keyup.meta.enter)="onValidKey()" #textarea>

      </textarea>
      <div *ngIf="formErrors.text" class="form-error">
        {{ formErrors.text }}
      </div>
    </div>
  </div>

  <div class="submit-comment">
    <button *ngIf="isAddButtonDisplayed()" [ngClass]="{ disabled: !form.valid || addingComment }" i18n>
      Post comment
    </button>
  </div>
</form>