]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-capability-modal/rgw-user-capability-modal.component.html
8276e01e7c4bf30af6c67cc12d385e7665556fcb
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / rgw / rgw-user-capability-modal / rgw-user-capability-modal.component.html
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 #frm="ngForm"
7 [formGroup]="formGroup"
8 novalidate>
9 <div class="modal-body">
10 <!-- Type -->
11 <div class="form-group row">
12 <label class="cd-col-form-label"
13 [ngClass]="{'required': !editing}"
14 for="type"
15 i18n>Type</label>
16 <div class="cd-col-form-input">
17 <input id="type"
18 class="form-control"
19 type="text"
20 *ngIf="editing"
21 [readonly]="true"
22 formControlName="type">
23 <select id="type"
24 class="form-control"
25 formControlName="type"
26 *ngIf="!editing"
27 autofocus>
28 <option i18n
29 *ngIf="types !== null"
30 [ngValue]="null">-- Select a type --</option>
31 <option *ngFor="let type of types"
32 [value]="type">{{ type }}</option>
33 </select>
34 <span class="invalid-feedback"
35 *ngIf="formGroup.showError('type', frm, 'required')"
36 i18n>This field is required.</span>
37 </div>
38 </div>
39
40 <!-- Permission -->
41 <div class="form-group row">
42 <label class="cd-col-form-label required"
43 for="perm"
44 i18n>Permission</label>
45 <div class="cd-col-form-input">
46 <select id="perm"
47 class="form-control"
48 formControlName="perm">
49 <option i18n
50 [ngValue]="null">-- Select a permission --</option>
51 <option *ngFor="let perm of ['read', 'write', '*']"
52 [value]="perm">
53 {{ perm }}
54 </option>
55 </select>
56 <span class="invalid-feedback"
57 *ngIf="formGroup.showError('perm', frm, 'required')"
58 i18n>This field is required.</span>
59 </div>
60 </div>
61 </div>
62
63 <div class="modal-footer">
64 <cd-form-button-panel (submitActionEvent)="onSubmit()"
65 [form]="formGroup"
66 [submitText]="(action | titlecase) + ' ' + (resource | upperFirst)"></cd-form-button-panel>
67 </div>
68 </form>
69 </ng-container>
70 </cd-modal>