]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/blob
0d02e3e1dc05afaf3151ef64bc05b81a2a928a84
[ceph-ci.git] /
1 <cd-modal>
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         <p>
13           <ng-container i18n>To move</ng-container>&nbsp;
14           <kbd>{{ poolName }}/{{ imageName }}</kbd>&nbsp;
15           <ng-container i18n>to trash, click</ng-container>&nbsp;
16           <kbd i18n>Move Image</kbd>.&nbsp;
17           <ng-container i18n>Optionally, you can pick an expiration date.</ng-container>
18         </p>
19
20         <div class="form-group"
21              [ngClass]="{'has-error': moveForm.showError('expiresAt', formDir)}">
22           <label for="expires"
23                  i18n>Protection expires at</label>
24           <input type="text"
25                  placeholder="NOT PROTECTED"
26                  i18n-placeholder
27                  class="form-control"
28                  [minDate]="minDate"
29                  [bsConfig]="bsConfig"
30                  formControlName="expiresAt"
31                  bsDatepicker>
32           <span i18n
33                 class="help-block"
34                 *ngIf="moveForm.showError('expiresAt', formDir, 'format')">
35             Wrong date format. Please use "YYYY-MM-DD HH:mm:ss".
36           </span>
37           <span i18n
38                 class="help-block"
39                 *ngIf="moveForm.showError('expiresAt', formDir, 'expired')">
40             Protection has already expired. Please pick a future date or leave it empty.
41           </span>
42         </div>
43       </div>
44
45       <div class="modal-footer">
46         <div class="button-group text-right">
47           <cd-submit-button i18n
48                             [form]="moveForm"
49                             (submitAction)="moveImage()">
50             Move Image
51           </cd-submit-button>
52           <button i18n
53                   type="button"
54                   class="btn btn-sm btn-default"
55                   (click)="modalRef.hide()">Cancel</button>
56         </div>
57       </div>
58     </form>
59   </ng-container>
60 </cd-modal>