All files / src/app/ceph/block/rbd-trash-move-modal rbd-trash-move-modal.component.html

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 505x                                                                                                  
<cd-modal>
  <ng-container i18n
                class="modal-title">Move an image to trash</ng-container>
 
  <ng-container class="modal-content">
    <form name="moveForm"
          class="form"
          #formDir="ngForm"
          [formGroup]="moveForm"
          novalidate>
      <div class="modal-body">
        <p i18n>To move <kbd>{{ poolName }}/{{ imageName }}</kbd> to trash,
          click <kbd>Move Image</kbd>. Optionally, you can pick an expiration date.</p>
 
        <div class="form-group"
             [ngClass]="{'has-error': moveForm.showError('expiresAt', formDir)}">
          <label for="expires"
                 i18n>Protection expires at</label>
          <input type="text"
                 placeholder="NOT PROTECTED"
                 i18n-placeholder
                 class="form-control"
                 [minDate]="minDate"
                 [bsConfig]="bsConfig"
                 formControlName="expiresAt"
                 bsDatepicker>
          <span class="help-block"
                *ngIf="moveForm.showError('expiresAt', formDir, 'format')"
                i18n>Wrong date format. Please use "YYYY-MM-DD HH:mm:ss".</span>
          <span class="help-block"
                *ngIf="moveForm.showError('expiresAt', formDir, 'expired')"
                i18n>Protection has already expired. Please pick a future date or leave it empty.</span>
        </div>
      </div>
 
      <div class="modal-footer">
        <div class="button-group text-right">
          <cd-submit-button i18n
                            [form]="moveForm"
                            (submitAction)="moveImage()">Move Image</cd-submit-button>
          <cd-back-button [back]="modalRef.hide"
                          name="Cancel"
                          i18n-name>
          </cd-back-button>
        </div>
      </div>
    </form>
  </ng-container>
</cd-modal>