diff --git a/src/app/register2/components/backend-error/backend-error.component.html b/src/app/register2/components/backend-error/backend-error.component.html index df4401c026..e4bf00b294 100644 --- a/src/app/register2/components/backend-error/backend-error.component.html +++ b/src/app/register2/components/backend-error/backend-error.component.html @@ -1,13 +1,21 @@ - This email already exists in our system. Would you like to + + This email already exists in our system. Would you like to + + sign in? + - sign in? + + This email is already associated with an existing ORCID record. Please use a different email address. + (this.registrationTogglz = value)) if (!(this.errorCode in RegisterBackendErrors)) { this.unrecognizedError = true } diff --git a/src/app/register2/components/form-personal/form-personal.component.html b/src/app/register2/components/form-personal/form-personal.component.html index 237ff52302..8baaa83ff0 100644 --- a/src/app/register2/components/form-personal/form-personal.component.html +++ b/src/app/register2/components/form-personal/form-personal.component.html @@ -88,11 +88,10 @@

done @@ -143,7 +145,7 @@

*ngFor="let error of this.emails.getError('backendError', 'email')" > diff --git a/src/app/register2/components/form-personal/form-personal.component.ts b/src/app/register2/components/form-personal/form-personal.component.ts index 4a88364b3e..284bdc1f63 100644 --- a/src/app/register2/components/form-personal/form-personal.component.ts +++ b/src/app/register2/components/form-personal/form-personal.component.ts @@ -282,6 +282,15 @@ export class FormPersonalComponent extends BaseForm implements OnInit { return validStatus } + get emailError(): boolean { + if (this.emailFormTouched && this.emails.controls.email.errors) { + const backendError = this.emails.controls.email.errors?.backendError + return !(backendError && backendError[0] === 'orcid.frontend.verify.duplicate_email' && !this.nextButtonWasClicked); + } + return false + } + + private announce(announcement: string) { if (environment.debugger) { console.debug('📢' + announcement) diff --git a/src/app/register2/components/register2.scss-theme.scss b/src/app/register2/components/register2.scss-theme.scss index 39d24119c4..5625fb133b 100644 --- a/src/app/register2/components/register2.scss-theme.scss +++ b/src/app/register2/components/register2.scss-theme.scss @@ -87,6 +87,16 @@ ); } } + + .disable-error { + .mat-form-field-outline { + color: rgba(0, 0, 0, 0.12) !important; + } + .mat-input-element { + color: $orcid-dark-primary-text !important; + } + } + } } diff --git a/src/locale/properties/register/register.en.properties b/src/locale/properties/register/register.en.properties index baa1642882..81c4e170b0 100644 --- a/src/locale/properties/register/register.en.properties +++ b/src/locale/properties/register/register.en.properties @@ -190,3 +190,4 @@ register.emailAreNotValid=Your emails do not match register.Email=Email register.VisibilityParties=Trusted parties register.emailPlaceholder=The email address you use most +register.emailIsAlreadyAssociated=This email is already associated with an existing ORCID record. Please use a different email address. diff --git a/src/locale/properties/register/register.lr.properties b/src/locale/properties/register/register.lr.properties index bffb3a75d1..9b60c4c162 100644 --- a/src/locale/properties/register/register.lr.properties +++ b/src/locale/properties/register/register.lr.properties @@ -194,3 +194,4 @@ register.emailAreNotValid=LR register.confirmYourPassword=LR register.VisibilityParties=LR register.emailPlaceholder=LR +register.emailIsAlreadyAssociated=LR diff --git a/src/locale/properties/register/register.rl.properties b/src/locale/properties/register/register.rl.properties index e838f99428..0c77eac32b 100644 --- a/src/locale/properties/register/register.rl.properties +++ b/src/locale/properties/register/register.rl.properties @@ -194,3 +194,4 @@ register.emailAreNotValid=RL register.confirmYourPassword=RL register.VisibilityParties=RL register.emailPlaceholder=RL +register.emailIsAlreadyAssociated=RL diff --git a/src/locale/properties/register/register.xx.properties b/src/locale/properties/register/register.xx.properties index 55c3d51931..a6808f9e56 100644 --- a/src/locale/properties/register/register.xx.properties +++ b/src/locale/properties/register/register.xx.properties @@ -194,3 +194,4 @@ register.emailAreNotValid=X register.confirmYourPassword=X register.VisibilityParties=X register.emailPlaceholder=X +register.emailIsAlreadyAssociated=X