aboutsummaryrefslogblamecommitdiffhomepage
path: root/client/src/app/videos/+video-watch/comment/video-comment-add.component.html
blob: 865908ba43f96591f895d15a35656ae2cc9facc8 (plain) (tree)
1
2
3
4
5
6
7
8
                                                                 



                                                   

                                                                                                                     
 



                                                      








                                                                                 
<form novalidate [formGroup]="form" (ngSubmit)="formValidated()">
  <div class="avatar-and-textarea">
    <img [src]="getUserAvatarUrl()" alt="Avatar" />

    <div class="form-group">
      <textarea placeholder="Add comment..." formControlName="text" [ngClass]="{ 'input-error': formErrors['text'] }"
                (keyup.control.enter)="formValidated()" (keyup.meta.enter)="formValidated()" #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 }">
      Post comment
    </button>
  </div>
</form>