diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index 36ca4c949..95ff84550 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -151,7 +151,7 @@ const routes: Routes = [ matcher: routerReactivation, canActivateChild: [LanguageGuard, RegisterGuard], loadChildren: () => - import('./register/register.module').then((m) => m.RegisterModuleLegacy), + import('./register2/register.module').then((m) => m.Register2Module), }, { path: ApplicationRoutes.selfService, 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 c4baf5152..e1344a83d 100644 --- a/src/app/register2/components/form-personal/form-personal.component.html +++ b/src/app/register2/components/form-personal/form-personal.component.html @@ -114,11 +114,16 @@

appearance="outline" [hideRequiredMarker]="true" [ngClass]="{ - 'valid-password-input': emailsAreValid, + 'valid-password-input': + emailsAreValid || this.reactivation?.isReactivation, 'disable-error': !emailError }" > - done + done -
+
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 043b19e13..c9a7b3e3f 100644 --- a/src/app/register2/components/form-personal/form-personal.component.ts +++ b/src/app/register2/components/form-personal/form-personal.component.ts @@ -152,7 +152,9 @@ export class FormPersonalComponent { email: new UntypedFormControl('', { validators: [Validators.required, OrcidValidators.email], - asyncValidators: this._register.backendValueValidate('email'), + asyncValidators: + !this.reactivation?.isReactivation && + this._register.backendValueValidate('email'), }), additionalEmails: this.additionalEmails, }, @@ -320,7 +322,7 @@ export class FormPersonalComponent get emailConfirmationValid() { return ((this.form.controls.emails as any).controls?.confirmEmail as any) - .valid + ?.valid } get givenNameFormTouched() { diff --git a/src/app/register2/components/step-a/step-a.component.html b/src/app/register2/components/step-a/step-a.component.html index 21396af6f..3febf71af 100644 --- a/src/app/register2/components/step-a/step-a.component.html +++ b/src/app/register2/components/step-a/step-a.component.html @@ -13,11 +13,13 @@

Create your ORCID iD

- - Thank you for reactivating your ORCID iD. + +

+ Reactivate your ORCID account +

@@ -71,7 +73,16 @@

type="button" id="step-a-back-button" > - Cancel registration + Cancel registration + Cancel reactivation

diff --git a/src/app/register2/components/step-a/step-a.component.ts b/src/app/register2/components/step-a/step-a.component.ts index 664f9a5ff..b6a4dc9f4 100644 --- a/src/app/register2/components/step-a/step-a.component.ts +++ b/src/app/register2/components/step-a/step-a.component.ts @@ -79,7 +79,7 @@ export class StepAComponent ngAfterViewInit(): void { // Timeout used to get focus on the first input after the first step loads setTimeout(() => { - this.firstInput.nativeElement.focus() + this.firstInput?.nativeElement.focus() }), 100 } diff --git a/src/app/register2/components/step-b/step-b.component.html b/src/app/register2/components/step-b/step-b.component.html index bf1edfd6c..cc4ac1bbd 100644 --- a/src/app/register2/components/step-b/step-b.component.html +++ b/src/app/register2/components/step-b/step-b.component.html @@ -13,11 +13,13 @@

Create your ORCID iD

- - Thank you for reactivating your ORCID iD. + +

+ Reactivate your ORCID account +

@@ -41,18 +43,7 @@

matStepperNext (click)="nextButton2()" > - - Next Step - - - REACTIVATE - + Next Step

- - Thank you for reactivating your ORCID iD. + +

+ Reactivate your ORCID account +

@@ -47,18 +49,7 @@

matStepperNext (click)="nextButton2()" > - - Next Step - - - REACTIVATE - + Next Step

- - Thank you for reactivating your ORCID iD. + +

+ Reactivate your ORCID account +

@@ -51,18 +53,7 @@

[disabled]="loading" (click)="nextButton2()" > - - Next Step - - - REACTIVATE - + Next Step

- - Thank you for reactivating your ORCID iD. + +

+ Reactivate your ORCID account +

@@ -57,9 +59,9 @@

- REACTIVATE + Reactivate my ORCID account

diff --git a/src/app/register2/register-observability.service.ts b/src/app/register2/register-observability.service.ts index cc00b1655..6282415e1 100644 --- a/src/app/register2/register-observability.service.ts +++ b/src/app/register2/register-observability.service.ts @@ -52,9 +52,9 @@ export class RegisterObservabilityService { emailError: (form.controls.emails as UntypedFormGroup).controls.email .errors, confirmEmailError: (form.controls.emails as UntypedFormGroup).controls - .confirmEmail.errors, + .confirmEmail?.errors, additionalEmailsError: (form.controls.emails as UntypedFormGroup) - .controls.additionalEmails.errors, + .controls.additionalEmails?.errors, }, } ) diff --git a/src/locale/properties/register/register.en.properties b/src/locale/properties/register/register.en.properties index c3553c6e4..96831f6c0 100644 --- a/src/locale/properties/register/register.en.properties +++ b/src/locale/properties/register/register.en.properties @@ -103,6 +103,8 @@ register.reactivating=Reactivating your account register.resendReactivate=click here to reactivate register.deactivated=A deactivated ORCID record is associated with this email address. register.reactivation=Thank you for reactivating your ORCID iD. +register.reactivateYourOrcidAccount=Reactivate your ORCID account +register.reactivateMyOrcidAccount=Reactivate my ORCID account register.reactivate=REACTIVATE register.passwordIsToLong=Passwords must be between 8 and 256 characters long register.wrongPasswordPatternV2=Password must meet all requirements @@ -166,6 +168,7 @@ register.step3.3=Step 3 of 5 - Current employment register.step5.3=Step 5 of 5 - Terms and conditions register.nextStep=Next Step register.cancelRegistration=Cancel registration +register.cancelReactivation=Cancel reactivation register.previousStep=Previous Step register.completeRegistration=Complete registration register.passwordRequired2=Please enter a password