]> git.apps.os.sepia.ceph.com Git - ceph.git/blob
fb246a44451b10849378586cb82c5f17114db0fe
[ceph.git] /
1 <cd-modal [modalRef]="activeModal">
2   <ng-container i18n="form title"
3                 class="modal-title">{{ action | titlecase }} {{ resource | upperFirst }}</ng-container>
4
5   <ng-container class="modal-content">
6     <form name="snapshotForm"
7           #formDir="ngForm"
8           [formGroup]="snapshotForm"
9           novalidate>
10       <div class="modal-body">
11         <!-- Name -->
12         <div class="form-group row">
13           <label class="cd-col-form-label required"
14                  for="snapshotName"
15                  i18n>Name</label>
16           <div class="cd-col-form-input">
17             <input class="form-control"
18                    type="text"
19                    placeholder="Snapshot name..."
20                    id="snapshotName"
21                    name="snapshotName"
22                    [attr.disabled]="((mirroring === 'snapshot') ? true : null) && (snapshotForm.getValue('mirrorImageSnapshot') === true) ? true: null"
23                    formControlName="snapshotName"
24                    autofocus>
25             <span class="invalid-feedback"
26                   *ngIf="snapshotForm.showError('snapshotName', formDir, 'required')"
27                   i18n>This field is required.</span><br><br>
28             <span *ngIf="((mirroring === 'snapshot') ? true : null) && (snapshotForm.getValue('mirrorImageSnapshot') === true) ? true: null"
29                   i18n>Snapshot mode is enabled on image <b>{{ imageName }}</b>: snapshot names are auto generated</span>
30           </div>
31         </div>
32         <div *ngIf="(mirroring === 'snapshot') ? true : null">
33           <div class="form-group row">
34             <div class="cd-col-form-offset">
35               <div class="custom-control custom-checkbox">
36                 <input type="checkbox"
37                        class="custom-control-input"
38                        formControlName="mirrorImageSnapshot"
39                        name="mirrorImageSnapshot"
40                        id="mirrorImageSnapshot"
41                        (change)="onMirrorCheckBoxChange()">
42                 <label for="mirrorImageSnapshot"
43                        class="custom-control-label"
44                        i18n>Mirror Image Snapshot</label>
45               </div>
46             </div>
47           </div>
48         </div>
49       </div>
50       <div class="modal-footer">
51         <cd-form-button-panel (submitActionEvent)="submit()"
52                               [form]="snapshotForm"
53                               [submitText]="(action | titlecase) + ' ' + (resource | upperFirst)"></cd-form-button-panel>
54       </div>
55     </form>
56   </ng-container>
57 </cd-modal>