Skip to content

Commit ff9d0ca

Browse files
committed
PD-4790 fix template
1 parent 6ae9e4e commit ff9d0ca

1 file changed

Lines changed: 9 additions & 123 deletions

File tree

src/app/account-settings/components/settings-security-password/settings-security-password.component.html

Lines changed: 9 additions & 123 deletions
Original file line numberDiff line numberDiff line change
@@ -178,101 +178,6 @@
178178
}
179179
</div>
180180
</mat-form-field>
181-
<mat-error
182-
class="w-full orc-font-small-print mt-2"
183-
*ngIf="
184-
form.hasError('required', 'retypedPassword') &&
185-
form.controls.retypedPassword.touched
186-
"
187-
i18n="@@register.passwordConfirmationRequired"
188-
>
189-
<div class="flex">
190-
<input
191-
formControlName="password"
192-
type="password"
193-
matInput
194-
autocomplete="new-password"
195-
[errorStateMatcher]="errorMatcher"
196-
id="cy-password-input"
197-
/>
198-
@if (!validate8orMoreCharacters && !validateAtLeastALetterOrSymbol
199-
&& !validateAtLeastANumber && form.controls.retypedPassword.value
200-
=== form.controls.password.value){
201-
<mat-icon class="check ml-1">check</mat-icon>
202-
}
203-
</div>
204-
</mat-form-field>
205-
<mat-error
206-
class="w-full orc-font-small-print mt-2"
207-
*ngIf="
208-
form.hasError('required', 'password') &&
209-
form.controls.password.touched
210-
"
211-
i18n="@@shared.passwordCantBeEmpty"
212-
>
213-
Password cannot be empty
214-
</mat-error>
215-
<mat-error
216-
class="w-full orc-font-small-print mt-2"
217-
*ngIf="
218-
!form.hasError('required', 'password') &&
219-
(form.hasError('minlength', 'password') ||
220-
form.hasError('pattern', 'password')) &&
221-
form.controls.password.touched
222-
"
223-
i18n="@@register.wrongPasswordPatternV2"
224-
>
225-
Password must meet all requirements
226-
</mat-error>
227-
<mat-error
228-
class="w-full orc-font-small-print mt-2"
229-
*ngIf="form.hasError('maxlength', 'password')"
230-
i18n="@@register.passwordIsToLongV2"
231-
>
232-
Password must be between 8 and 256 characters
233-
</mat-error>
234-
<mat-error
235-
class="w-full orc-font-small-print mt-2"
236-
*ngIf="this.form.hasError('backendError', 'password')"
237-
>
238-
<div
239-
*ngFor="let error of this.form.getError('backendError', 'password')"
240-
>
241-
{{ error }}
242-
</div>
243-
</mat-error>
244-
</div>
245-
<div class="mb-6">
246-
<mat-form-field
247-
appearance="outline"
248-
class="mat-form-field-min input-container no-hint"
249-
[ngClass]="{
250-
'valid-password border rounded-xs':
251-
!validate8orMoreCharacters &&
252-
!validateAtLeastALetterOrSymbol &&
253-
!validateAtLeastANumber &&
254-
form.controls.retypedPassword.value ===
255-
form.controls.password.value
256-
}"
257-
>
258-
<div class="flex">
259-
<input
260-
formControlName="retypedPassword"
261-
type="password"
262-
matInput
263-
autocomplete="new-password"
264-
id="cy-password-confirm-input"
265-
class="grow"
266-
[errorStateMatcher]="errorMatcher"
267-
placeholder="{{ confirmPasswordPlaceholder }}"
268-
/>
269-
@if (!validate8orMoreCharacters && !validateAtLeastALetterOrSymbol
270-
&& !validateAtLeastANumber && form.controls.retypedPassword.value
271-
=== form.controls.password.value){
272-
<mat-icon class="check ml-1">check</mat-icon>
273-
}
274-
</div>
275-
</mat-form-field>
276181
<mat-error
277182
class="w-full orc-font-small-print mt-2"
278183
*ngIf="
@@ -321,28 +226,6 @@
321226
</li>
322227
</ol>
323228

324-
@if (twoFactorState) {
325-
<app-two-factor-auth-form
326-
class="w-[537px] block mb-8"
327-
codeControlName="twoFactorCode"
328-
recoveryControlName="twoFactorRecoveryCode"
329-
[showAlert]="true"
330-
>
331-
</app-two-factor-auth-form>
332-
}
333-
<div class="button-container">
334-
<button
335-
(click)="save()"
336-
type="submit"
337-
mat-raised-button
338-
color="primary"
339-
i18n="@@shared.saveChanges"
340-
id="cy-save-password"
341-
>
342-
Save changes
343-
</button>
344-
</div>
345-
346229
@if (twoFactorState) {
347230
<app-auth-challenge
348231
class="w-[537px] block mb-8"
@@ -367,11 +250,14 @@
367250
</button>
368251
</div>
369252

370-
<ng-template #valid>
371-
<mat-icon class="valid">check_circle</mat-icon>
372-
</ng-template>
253+
<ng-template #valid>
254+
<mat-icon class="checked" class="valid mr-1">check_circle</mat-icon>
255+
</ng-template>
373256

374-
<ng-template #invalid>
375-
<mat-icon class="material-icons-outlined">check_circle</mat-icon>
376-
</ng-template>
257+
<ng-template #invalid>
258+
<mat-icon class="no-checked material-icons-outlined mr-1"
259+
>radio_button_unchecked
260+
</mat-icon>
261+
</ng-template>
262+
</form>
377263
</app-settings-panels-data>

0 commit comments

Comments
 (0)