]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-form/user-form.component.html
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / core / auth / user-form / user-form.component.html
1 <div class="col-sm-12 col-lg-6">
2 <form name="userForm"
3 class="form-horizontal"
4 #formDir="ngForm"
5 [formGroup]="userForm"
6 novalidate>
7 <div class="panel panel-default">
8 <div class="panel-heading">
9 <h3 i18n="form title|Example: Create Pool@@formTitle"
10 class="panel-title">{{ action | titlecase }} {{ resource | upperFirst }}</h3>
11 </div>
12 <div class="panel-body">
13
14 <!-- Username -->
15 <div class="form-group"
16 [ngClass]="{'has-error': userForm.showError('username', formDir)}">
17 <label class="control-label col-sm-3"
18 for="name">
19 <ng-container i18n>Username</ng-container>
20 <span class="required"
21 *ngIf="mode !== userFormMode.editing"></span>
22 </label>
23 <div class="col-sm-9">
24 <input class="form-control"
25 type="text"
26 placeholder="Username..."
27 id="username"
28 name="username"
29 formControlName="username"
30 autofocus>
31 <span class="help-block"
32 *ngIf="userForm.showError('username', formDir, 'required')"
33 i18n>This field is required.</span>
34 </div>
35 </div>
36
37 <!-- Password -->
38 <div class="form-group"
39 [ngClass]="{'has-error': userForm.showError('password', formDir)}">
40 <label i18n
41 class="control-label col-sm-3"
42 for="name">Password</label>
43 <div class="col-sm-9">
44 <div class="input-group">
45 <input class="form-control"
46 type="password"
47 placeholder="Password..."
48 id="password"
49 name="password"
50 autocomplete="new-password"
51 formControlName="password">
52 <span class="input-group-btn">
53 <button type="button"
54 class="btn btn-default"
55 cdPasswordButton="password">
56 </button>
57 </span>
58 </div>
59 <span class="help-block"
60 *ngIf="userForm.showError('password', formDir, 'required')"
61 i18n>This field is required.</span>
62 </div>
63 </div>
64
65 <!-- Confirm password -->
66 <div class="form-group"
67 [ngClass]="{'has-error': userForm.showError('confirmpassword', formDir)}">
68 <label i18n
69 class="control-label col-sm-3"
70 for="name">Confirm password</label>
71 <div class="col-sm-9">
72 <div class="input-group">
73 <input class="form-control"
74 type="password"
75 placeholder="Confirm password..."
76 id="confirmpassword"
77 name="confirmpassword"
78 formControlName="confirmpassword">
79 <span class="input-group-btn">
80 <button type="button"
81 class="btn btn-default"
82 cdPasswordButton="confirmpassword">
83 </button>
84 </span>
85 </div>
86 <span class="help-block"
87 *ngIf="userForm.showError('confirmpassword', formDir, 'required')"
88 i18n>This field is required.</span>
89 <span class="help-block"
90 *ngIf="userForm.showError('confirmpassword', formDir, 'match')"
91 i18n>Password confirmation doesn't match the password.</span>
92 </div>
93 </div>
94
95 <!-- Name -->
96 <div class="form-group">
97 <label i18n
98 class="control-label col-sm-3"
99 for="name">Full name</label>
100 <div class="col-sm-9">
101 <input class="form-control"
102 type="text"
103 placeholder="Full name..."
104 id="name"
105 name="name"
106 formControlName="name">
107 </div>
108 </div>
109
110 <!-- Email -->
111 <div class="form-group"
112 [ngClass]="{'has-error': userForm.showError('email', formDir)}">
113 <label i18n
114 class="control-label col-sm-3"
115 for="email">Email</label>
116 <div class="col-sm-9">
117 <input class="form-control"
118 type="email"
119 placeholder="Email..."
120 id="email"
121 name="email"
122 formControlName="email">
123
124 <span class="help-block"
125 *ngIf="userForm.showError('email', formDir, 'email')"
126 i18n>Invalid email.</span>
127 </div>
128 </div>
129
130 <!-- Roles -->
131 <label class="col-sm-3 control-label"
132 i18n>Roles</label>
133 <div class="col-sm-9">
134 <span class="form-control no-border full-height"
135 *ngIf="allRoles">
136 <cd-select-badges [data]="userForm.controls.roles.value"
137 [options]="allRoles"
138 [messages]="messages"></cd-select-badges>
139 </span>
140 </div>
141
142 </div>
143 <div class="panel-footer">
144 <div class="button-group text-right">
145 <cd-submit-button
146 [form]="formDir"
147 (submitAction)="submit()"
148 i18n="form action button|Example: Create Pool@@formActionButton"
149 type="button">{{ action | titlecase }} {{ resource | upperFirst }}</cd-submit-button>
150 <cd-back-button></cd-back-button>
151 </div>
152 </div>
153 </div>
154 </form>
155 </div>
156
157 <ng-template #removeSelfUserReadUpdatePermissionTpl>
158 <p><strong i18n>You are about to remove "user read / update" permissions from your own user.</strong></p>
159 <br>
160 <p i18n>If you continue, you will no longer be able to add or remove roles from any user.</p>
161
162 <ng-container i18n>Are you sure you want to continue?</ng-container>
163 </ng-template>