]> git.apps.os.sepia.ceph.com Git - ceph.git/blob
2bd0bdcd9f81e10afbf9d1dbdbb16fabbb0e3382
[ceph.git] /
1 <cd-modal [modalRef]="activeModal">
2   <ng-container i18n
3                 class="modal-title">Move an image to trash</ng-container>
4
5   <ng-container class="modal-content">
6     <form name="moveForm"
7           class="form"
8           #formDir="ngForm"
9           [formGroup]="moveForm"
10           novalidate>
11       <div class="modal-body">
12         <div class="alert alert-warning"
13              *ngIf="hasSnapshots"
14              role="alert">
15           <span i18n>This image contains snapshot(s), which will prevent it
16             from being removed after moved to trash.</span>
17         </div>
18
19         <p i18n>To move <kbd>{{ imageSpecStr }}</kbd> to trash,
20           click <kbd>Move Image</kbd>. Optionally, you can pick an expiration date.</p>
21
22         <div class="form-group">
23           <label class="col-form-label"
24                  for="expires"
25                  i18n>Protection expires at</label>
26           <input type="text"
27                  placeholder="NOT PROTECTED"
28                  i18n-placeholder
29                  class="form-control"
30                  [minDate]="minDate"
31                  [bsConfig]="bsConfig"
32                  formControlName="expiresAt"
33                  bsDatepicker>
34           <span class="invalid-feedback"
35                 *ngIf="moveForm.showError('expiresAt', formDir, 'format')"
36                 i18n>Wrong date format. Please use "YYYY-MM-DD HH:mm:ss".</span>
37           <span class="invalid-feedback"
38                 *ngIf="moveForm.showError('expiresAt', formDir, 'expired')"
39                 i18n>Protection has already expired. Please pick a future date or leave it empty.</span>
40         </div>
41       </div>
42
43       <div class="modal-footer">
44         <cd-submit-button i18n
45                           [form]="moveForm"
46                           (submitAction)="moveImage()">Move Image</cd-submit-button>
47         <cd-back-button [back]="activeModal.close"
48                         name="Cancel"
49                         i18n-name>
50         </cd-back-button>
51       </div>
52     </form>
53   </ng-container>
54 </cd-modal>