]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/blob
aa88e5be78c2696440458eb243285c468290c723
[ceph-ci.git] /
1 <div class="modal-header">
2   <h4 i18n="form title|Example: Create Pool@@formTitle"
3       class="modal-title float-left">{{ action | titlecase }} {{ resource | upperFirst }}</h4>
4
5   <button type="button"
6           class="close float-right"
7           aria-label="Close"
8           (click)="bsModalRef.hide()">
9     <span aria-hidden="true">&times;</span>
10   </button>
11 </div>
12 <form #frm="ngForm"
13       [formGroup]="formGroup"
14       novalidate>
15   <div class="modal-body">
16
17     <!-- Type -->
18     <div class="form-group row"
19          [ngClass]="{':invalid': formGroup.showError('type', frm)}">
20       <label class="col-form-label col-sm-3"
21              for="type">
22         <ng-container i18n>Type</ng-container>
23         <span class="required"
24               *ngIf="!editing">
25         </span>
26       </label>
27       <div class="col-sm-9">
28         <input id="type"
29                class="form-control"
30                type="text"
31                *ngIf="editing"
32                [readonly]="true"
33                formControlName="type">
34         <select id="type"
35                 class="form-control"
36                 formControlName="type"
37                 *ngIf="!editing"
38                 autofocus>
39           <option i18n
40                   *ngIf="types !== null"
41                   [ngValue]="null">-- Select a type --</option>
42           <option *ngFor="let type of types"
43                   [value]="type">{{ type }}</option>
44         </select>
45         <span class="form-text text-muted"
46               *ngIf="formGroup.showError('type', frm, 'required')"
47               i18n>This field is required.</span>
48       </div>
49     </div>
50
51     <!-- Permission -->
52     <div class="form-group row"
53          [ngClass]="{':invalid': formGroup.showError('perm', frm)}">
54       <label class="col-form-label col-sm-3"
55              for="perm">
56         <ng-container i18n>Permission</ng-container>
57         <span class="required"></span>
58       </label>
59       <div class="col-sm-9">
60         <select id="perm"
61                 class="form-control"
62                 formControlName="perm">
63           <option i18n
64                   [ngValue]="null">-- Select a permission --</option>
65           <option *ngFor="let perm of ['read', 'write', '*']"
66                   [value]="perm">
67             {{ perm }}
68           </option>
69         </select>
70         <span class="form-text text-muted"
71               *ngIf="formGroup.showError('perm', frm, 'required')"
72               i18n>This field is required.</span>
73       </div>
74     </div>
75
76   </div>
77   <div class="modal-footer">
78     <cd-submit-button (submitAction)="onSubmit()"
79                       i18n="form action button|Example: Create Pool@@formActionButton"
80                       [form]="formGroup">{{ action | titlecase }} {{ resource | upperFirst }}</cd-submit-button>
81     <cd-back-button [back]="bsModalRef.hide"></cd-back-button>
82   </div>
83 </form>