1 <div class=
"cd-col-form"
2 *
cdFormLoading=
"loading">
9 class=
"card-header">{{ action | titlecase }} {{ resource | upperFirst }}
</div>
10 <div class=
"card-body">
13 <div class=
"form-group row">
14 <label class=
"cd-col-form-label"
15 [ngClass]=
"{'required': mode !== userFormMode.editing}"
18 <div class=
"cd-col-form-input">
19 <input class=
"form-control"
21 placeholder=
"Username..."
24 formControlName=
"username"
27 <span class=
"invalid-feedback"
28 *
ngIf=
"userForm.showError('username', formDir, 'required')"
29 i18n
>This field is required.
</span>
30 <span class=
"invalid-feedback"
31 *
ngIf=
"userForm.showError('username', formDir, 'notUnique')"
32 i18n
>The username already exists.
</span>
37 <div class=
"form-group row"
38 *
ngIf=
"!authStorageService.isSSO()">
39 <label class=
"cd-col-form-label"
41 <ng-container i18n
>Password
</ng-container>
42 <cd-helper *
ngIf=
"passwordPolicyHelpText.length > 0"
44 html=
"{{ passwordPolicyHelpText }}">
47 <div class=
"cd-col-form-input">
48 <div class=
"input-group">
49 <input class=
"form-control"
51 placeholder=
"Password..."
54 autocomplete=
"new-password"
55 formControlName=
"password">
56 <span class=
"input-group-append">
59 cdPasswordButton=
"password">
63 <div class=
"password-strength-level">
64 <div class=
"{{ passwordStrengthLevelClass }}"
66 title=
"{{ passwordValuation }}">
69 <span class=
"invalid-feedback"
70 *
ngIf=
"userForm.showError('password', formDir, 'required')"
71 i18n
>This field is required.
</span>
72 <span class=
"invalid-feedback"
73 *
ngIf=
"userForm.showError('password', formDir, 'passwordPolicy')">
74 {{ passwordValuation }}
79 <!-- Confirm password -->
80 <div class=
"form-group row"
81 *
ngIf=
"!authStorageService.isSSO()">
83 class=
"cd-col-form-label"
84 for=
"confirmpassword">Confirm password
</label>
85 <div class=
"cd-col-form-input">
86 <div class=
"input-group">
87 <input class=
"form-control"
89 placeholder=
"Confirm password..."
91 name=
"confirmpassword"
92 autocomplete=
"new-password"
93 formControlName=
"confirmpassword">
94 <span class=
"input-group-append">
97 cdPasswordButton=
"confirmpassword">
100 <span class=
"invalid-feedback"
101 *
ngIf=
"userForm.showError('confirmpassword', formDir, 'match')"
102 i18n
>Password confirmation doesn't match the password.
</span>
104 <span class=
"invalid-feedback"
105 *
ngIf=
"userForm.showError('confirmpassword', formDir, 'required')"
106 i18n
>This field is required.
</span>
110 <!-- Password expiration date -->
111 <div class=
"form-group row"
112 *
ngIf=
"!authStorageService.isSSO()">
113 <label class=
"cd-col-form-label"
114 [ngClass]=
"{'required': pwdExpirationSettings.pwdExpirationSpan > 0}"
115 for=
"pwdExpirationDate">
116 <ng-container i18n
>Password expiration date
</ng-container>
117 <cd-helper class=
"text-pre-wrap"
118 *
ngIf=
"pwdExpirationSettings.pwdExpirationSpan == 0">
120 The Dashboard setting defining the expiration interval of
121 passwords is currently set to
<strong>0</strong>. This means
122 if a date is set, the user password will only expire once.
125 Consider configuring the Dashboard setting
126 <a routerLink=
"/mgr-modules/edit/dashboard"
127 class=
"alert-link">USER_PWD_EXPIRATION_SPAN
</a>
128 in order to let passwords expire periodically.
132 <div class=
"cd-col-form-input">
133 <div class=
"input-group">
134 <input class=
"form-control"
136 placeholder=
"Password expiration date..."
137 id=
"pwdExpirationDate"
138 name=
"pwdExpirationDate"
139 formControlName=
"pwdExpirationDate"
140 [ngbPopover]=
"popContent"
144 (keypress)=
"p.close()">
145 <span class=
"input-group-append">
146 <button type=
"button"
147 class=
"btn btn-light"
148 (click)=
"clearExpirationDate()">
149 <i class=
"icon-prepend {{ icons.destroy }}"></i>
152 <span class=
"invalid-feedback"
153 *
ngIf=
"userForm.showError('pwdExpirationDate', formDir, 'required')"
154 i18n
>This field is required.
</span>
160 <div class=
"form-group row">
162 class=
"cd-col-form-label"
163 for=
"name">Full name
</label>
164 <div class=
"cd-col-form-input">
165 <input class=
"form-control"
167 placeholder=
"Full name..."
170 formControlName=
"name">
175 <div class=
"form-group row">
177 class=
"cd-col-form-label"
178 for=
"email">Email
</label>
179 <div class=
"cd-col-form-input">
180 <input class=
"form-control"
182 placeholder=
"Email..."
185 formControlName=
"email">
187 <span class=
"invalid-feedback"
188 *
ngIf=
"userForm.showError('email', formDir, 'email')"
189 i18n
>Invalid email.
</span>
194 <div class=
"form-group row">
195 <label class=
"cd-col-form-label"
197 <div class=
"cd-col-form-input">
198 <span class=
"no-border full-height"
200 <cd-select-badges [data]=
"userForm.controls.roles.value"
202 [messages]=
"messages"></cd-select-badges>
208 <div class=
"form-group row"
209 *
ngIf=
"!isCurrentUser()">
210 <div class=
"cd-col-form-offset">
211 <div class=
"custom-control custom-checkbox">
212 <input type=
"checkbox"
213 class=
"custom-control-input"
216 formControlName=
"enabled">
217 <label class=
"custom-control-label"
224 <!-- Force change password -->
225 <div class=
"form-group row"
226 *
ngIf=
"!isCurrentUser() && !authStorageService.isSSO()">
227 <div class=
"cd-col-form-offset">
228 <div class=
"custom-control custom-checkbox">
229 <input type=
"checkbox"
230 class=
"custom-control-input"
231 id=
"pwdUpdateRequired"
232 name=
"pwdUpdateRequired"
233 formControlName=
"pwdUpdateRequired">
234 <label class=
"custom-control-label"
235 for=
"pwdUpdateRequired"
236 i18n
>User must change password at next logon
</label>
242 <div class=
"card-footer">
243 <cd-form-button-panel (submitActionEvent)=
"submit()"
245 [submitText]=
"(action | titlecase) + ' ' + (resource | upperFirst)"
246 wrappingClass=
"text-right"></cd-form-button-panel>
252 <ng-template #removeSelfUserReadUpdatePermissionTpl
>
253 <p><strong i18n
>You are about to remove
"user read / update" permissions from your own user.
</strong></p>
255 <p i18n
>If you continue, you will no longer be able to add or remove roles from any user.
</p>
257 <ng-container i18n
>Are you sure you want to continue?
</ng-container>
260 <ng-template #popContent
>
261 <cd-date-time-picker [control]=
"userForm.get('pwdExpirationDate')"
262 [hasTime]=
"false"></cd-date-time-picker>