<ng-container [formGroup]="form">
  <div class="modal-header">
    <h4 i18n class="modal-title">Edit caption</h4>
    <my-global-icon iconName="cross" aria-label="Close" role="button" (click)="hide()"></my-global-icon>
  </div>

  <div class="modal-body">
    <label i18n for="captionFileContent">Caption</label>
    <textarea
      id="captionFileContent"
      formControlName="captionFileContent"
      class="form-control caption-textarea"
      [ngClass]="{ 'input-error': formErrors['captionFileContent'] }"
      #textarea
    >
    </textarea>

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

  <div class="modal-footer inputs">
    <input
      type="button" role="button" i18n-value value="Cancel" class="peertube-button grey-button"
      (click)="cancel()" (key.enter)="cancel()"
    >

    <input
      type="submit" i18n-value value="Edit this caption" class="peertube-button orange-button"
      [disabled]="!form.valid" (click)="updateCaption()"
    >
  </div>
</ng-container>
