]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-subuser-modal/rgw-user-subuser-modal.component.html
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / rgw / rgw-user-subuser-modal / rgw-user-subuser-modal.component.html
1 <div class="modal-header">
2 <h4 i18n="form title|Example: Create Pool@@formTitle"
3 class="modal-title pull-left">{{ action | titlecase }} {{ resource | upperFirst }}</h4>
4 <button type="button"
5 class="close pull-right"
6 aria-label="Close"
7 (click)="bsModalRef.hide()">
8 <span aria-hidden="true">&times;</span>
9 </button>
10 </div>
11 <form class="form-horizontal"
12 #frm="ngForm"
13 [formGroup]="formGroup"
14 novalidate>
15 <div class="modal-body">
16
17 <!-- Username -->
18 <div class="form-group"
19 [ngClass]="{'has-error': formGroup.showError('uid', frm)}">
20 <label class="control-label col-sm-3"
21 for="uid"
22 i18n>Username</label>
23 <div class="col-sm-9">
24 <input id="uid"
25 class="form-control"
26 type="text"
27 formControlName="uid"
28 [readonly]="true">
29 </div>
30 </div>
31
32 <!-- Subuser -->
33 <div class="form-group"
34 [ngClass]="{'has-error': formGroup.showError('subuid', frm)}">
35 <label class="control-label col-sm-3"
36 for="subuid">
37 <ng-container i18n>Subuser</ng-container>
38 <span class="required"
39 *ngIf="!editing">
40 </span>
41 </label>
42 <div class="col-sm-9">
43 <input id="subuid"
44 class="form-control"
45 type="text"
46 formControlName="subuid"
47 [readonly]="editing"
48 autofocus>
49 <span class="help-block"
50 *ngIf="formGroup.showError('subuid', frm, 'required')"
51 i18n>This field is required.</span>
52 <span class="help-block"
53 *ngIf="formGroup.showError('subuid', frm, 'subuserIdExists')"
54 i18n>The chosen subuser ID is already in use.</span>
55 </div>
56 </div>
57
58 <!-- Permission -->
59 <div class="form-group"
60 [ngClass]="{'has-error': formGroup.showError('perm', frm)}">
61 <label class="control-label col-sm-3"
62 for="perm">
63 <ng-container i18n>Permission</ng-container>
64 <span class="required"></span>
65 </label>
66 <div class="col-sm-9">
67 <select id="perm"
68 class="form-control"
69 formControlName="perm">
70 <option i18n
71 [ngValue]="null">-- Select a permission --</option>
72 <option *ngFor="let perm of ['read', 'write']"
73 [value]="perm">
74 {{ perm }}
75 </option>
76 <option i18n
77 value="read-write">read, write</option>
78 <option i18n
79 value="full-control">full</option>
80 </select>
81 <span class="help-block"
82 *ngIf="formGroup.showError('perm', frm, 'required')"
83 i18n>This field is required.</span>
84 </div>
85 </div>
86
87 <!-- Swift key -->
88 <fieldset *ngIf="!editing">
89 <legend i18n>Swift key</legend>
90
91 <!-- Auto-generate key -->
92 <div class="form-group">
93 <div class="col-sm-offset-3 col-sm-9">
94 <div class="checkbox checkbox-primary">
95 <input id="generate_secret"
96 type="checkbox"
97 formControlName="generate_secret">
98 <label for="generate_secret"
99 i18n>Auto-generate secret</label>
100 </div>
101 </div>
102 </div>
103
104 <!-- Secret key -->
105 <div class="form-group"
106 [ngClass]="{'has-error': formGroup.showError('secret_key', frm)}"
107 *ngIf="!editing && !formGroup.getValue('generate_secret')">
108 <label class="control-label col-sm-3"
109 for="secret_key">
110 <ng-container i18n>Secret key</ng-container>
111 <span class="required"></span>
112 </label>
113 <div class="col-sm-9">
114 <div class="input-group">
115 <input id="secret_key"
116 class="form-control"
117 type="password"
118 formControlName="secret_key">
119 <span class="input-group-btn">
120 <button type="button"
121 class="btn btn-default"
122 cdPasswordButton="secret_key">
123 </button>
124 <button type="button"
125 class="btn btn-default"
126 cdCopy2ClipboardButton="secret_key">
127 </button>
128 </span>
129 </div>
130 <span class="help-block"
131 *ngIf="formGroup.showError('secret_key', frm, 'required')"
132 i18n>This field is required.</span>
133 </div>
134 </div>
135
136 </fieldset>
137
138 </div>
139 <div class="modal-footer">
140 <cd-submit-button
141 (submitAction)="onSubmit()"
142 i18n="form action button|Example: Create Pool@@formActionButton"
143 [form]="formGroup">{{ action | titlecase }} {{ resource | upperFirst }}</cd-submit-button>
144 <cd-back-button [back]="bsModalRef.hide"></cd-back-button>
145 </div>
146 </form>