Skip to content

Commit 6d69124

Browse files
authored
Merge pull request #2863 from ORCID/lmendoza/PD-5389
PD-5389, PD-5402
2 parents 1a1060c + a83fb58 commit 6d69124

5 files changed

Lines changed: 32 additions & 10 deletions

File tree

projects/orcid-ui/src/lib/components/record-header/record-header.component.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,11 @@
325325
min-width: 0;
326326
flex: 1; // Grow to fill space
327327

328+
// Keep Copy/Print actions close to the ORCID iD on desktop non-compact mode.
329+
.desktop:not(.compact) & {
330+
flex: 0 0 auto;
331+
}
332+
328333
.id-content {
329334
display: flex;
330335
align-items: center;

src/app/account-settings/components/settings-actions-duplicated/settings-actions-duplicated.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ <h4 title i18n>What happens when you remove a duplicate ORCID account?</h4>
5353
</ul>
5454
</app-alert-message>
5555
@if (authenticated) {
56-
<form [formGroup]="form" (ngSubmit)="onSubmit()">
56+
<form [formGroup]="form" (ngSubmit)="onSubmit()" autocomplete="off">
5757
<h3 i18n class="mb-2 mt-0">You are removing this duplicate account</h3>
5858
@if (data.deprecatingAccountName) {
5959
<p class="leading-5.25">{{ data.deprecatingAccountName }}</p>
@@ -82,7 +82,7 @@ <h3 i18n class="mb-2 mt-0">You are removing this duplicate account</h3>
8282
</button>
8383
</form>
8484
} @else {
85-
<form [formGroup]="form" (ngSubmit)="submitVerify()">
85+
<form [formGroup]="form" (ngSubmit)="submitVerify()" autocomplete="off">
8686
<h3 i18n class="mt-0 mb-2">Which account do you want to remove?</h3>
8787
<p i18n class="mb-8!">
8888
You will need to verify your sign in details for the duplicate account
@@ -108,7 +108,7 @@ <h3 i18n class="mt-0 mb-2">Which account do you want to remove?</h3>
108108
formControlName="deprecatingOrcidOrEmail"
109109
type="text"
110110
matInput
111-
autocomplete="email"
111+
autocomplete="off"
112112
[errorStateMatcher]="errorMatcher"
113113
id="cy-duplicate-rercod-email"
114114
/>
@@ -132,7 +132,7 @@ <h3 i18n class="mt-0 mb-2">Which account do you want to remove?</h3>
132132
formControlName="password"
133133
type="password"
134134
matInput
135-
autocomplete="password"
135+
autocomplete="new-password"
136136
[errorStateMatcher]="errorMatcher"
137137
id="cy-duplicate-rercod-email"
138138
/>

src/app/account-settings/components/settings-actions-duplicated/settings-actions-duplicated.component.ts

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'
1+
import {
2+
Component,
3+
EventEmitter,
4+
Input,
5+
OnDestroy,
6+
OnInit,
7+
Output,
8+
} from '@angular/core'
29
import {
310
FormGroupDirective,
411
NgForm,
@@ -37,7 +44,7 @@ export class NeverShowErrorMatcher implements ErrorStateMatcher {
3744
preserveWhitespaces: true,
3845
standalone: false,
3946
})
40-
export class SettingsActionsDuplicatedComponent implements OnInit {
47+
export class SettingsActionsDuplicatedComponent implements OnInit, OnDestroy {
4148
errorMatcher = new NeverShowErrorMatcher()
4249
userSession: UserSession
4350
constructor(
@@ -121,7 +128,7 @@ export class SettingsActionsDuplicatedComponent implements OnInit {
121128
document.activeElement.blur()
122129
}
123130
this.loadingVerify = false
124-
this.form.reset()
131+
this.resetFormState()
125132
if (success) {
126133
this.authenticated = true
127134
} else {
@@ -169,7 +176,7 @@ export class SettingsActionsDuplicatedComponent implements OnInit {
169176

170177
if (data.success) {
171178
this.errors = []
172-
this.form.reset()
179+
this.resetFormState()
173180
this.success = true
174181
}
175182
if (data.errors?.length || !data.twoFactorToken) {
@@ -179,9 +186,17 @@ export class SettingsActionsDuplicatedComponent implements OnInit {
179186
},
180187
error: () => {
181188
this.cancelAuthentication = true
182-
this.form.reset()
189+
this.resetFormState()
183190
this.loading.next(false)
184191
},
185192
})
186193
}
194+
195+
ngOnDestroy(): void {
196+
this.resetFormState()
197+
}
198+
199+
private resetFormState(): void {
200+
this.form?.reset()
201+
}
187202
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<app-settings-panels-data *ngIf="form">
2-
<form [formGroup]="form">
2+
<form [formGroup]="form" autocomplete="off">
33
@if (success) {
44
<app-alert-message type="success" class="mb-8">
55
<div content class="mt-0.5" i18n>
@@ -33,6 +33,7 @@
3333
matInput
3434
formControlName="oldPassword"
3535
type="password"
36+
autocomplete="new-password"
3637
[errorStateMatcher]="errorMatcher"
3738
[ngClass]="{
3839
error:

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -193,6 +193,7 @@ export class SettingsSecurityPasswordComponent implements OnInit, OnDestroy {
193193
return status
194194
}
195195
ngOnDestroy(): void {
196+
this.form?.reset()
196197
this.$destroy.next()
197198
this.$destroy.complete()
198199
}

0 commit comments

Comments
 (0)