summaryrefslogtreecommitdiffstats
path: root/src/pybind/mgr/dashboard/frontend/src/app/ceph/block/rbd-snapshot-form/rbd-snapshot-form-modal.component.html
blob: 598e3fd3843ecf27d6e1b9edc44e27c61cbc99f8 (plain)
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
<cd-modal [modalRef]="activeModal">
  <ng-container i18n="form title"
                class="modal-title">{{ action | titlecase }} {{ resource | upperFirst }}</ng-container>

  <ng-container class="modal-content">
    <form name="snapshotForm"
          #formDir="ngForm"
          [formGroup]="snapshotForm"
          novalidate>
      <div class="modal-body">
        <!-- Name -->
        <div class="form-group row">
          <label class="cd-col-form-label required"
                 for="snapshotName"
                 i18n>Name</label>
          <div class="cd-col-form-input">
            <input class="form-control"
                   type="text"
                   placeholder="Snapshot name..."
                   id="snapshotName"
                   name="snapshotName"
                   [attr.disabled]="(mirroring === 'snapshot') ? true : null"
                   formControlName="snapshotName"
                   autofocus>
            <span class="invalid-feedback"
                  *ngIf="snapshotForm.showError('snapshotName', formDir, 'required')"
                  i18n>This field is required.</span><br><br>
            <span *ngIf="mirroring === 'snapshot'"
                  i18n>Snapshot mode is enabled on image <b>{{ imageName }}</b>: snapshot names are auto generated</span>
          </div>
        </div>
      </div>

      <div class="modal-footer">
        <cd-form-button-panel (submitActionEvent)="submit()"
                              [form]="snapshotForm"
                              [submitText]="(action | titlecase) + ' ' + (resource | upperFirst)"></cd-form-button-panel>
      </div>
    </form>
  </ng-container>
</cd-modal>