diff --git a/src/app/core/register2/register2.form-adapter.ts b/src/app/core/register2/register2.form-adapter.ts index f4d52ad296..2f6c361163 100644 --- a/src/app/core/register2/register2.form-adapter.ts +++ b/src/app/core/register2/register2.form-adapter.ts @@ -125,7 +125,7 @@ export function Register2FormAdapterMixin>(base: T) { return { ...StepA.value.personal, ...StepB.value.password, - ...StepB.value.sendOrcidNews, + ...StepC.value.sendOrcidNews, ...StepD.value.activitiesVisibilityDefault, ...StepD.value.termsOfUse, ...StepD.value.captcha, diff --git a/src/app/register2/components/BaseForm.ts b/src/app/register2/components/BaseForm.ts index 317ced3fb2..67888b5de5 100644 --- a/src/app/register2/components/BaseForm.ts +++ b/src/app/register2/components/BaseForm.ts @@ -13,7 +13,6 @@ export abstract class BaseForm implements ControlValueAccessor, AsyncValidator { public onTouchedFunction constructor() {} writeValue(val: any): void { - console.log('writeValue', val) if (val != null && val !== undefined && val !== '') { this.form.setValue(val, { emitEvent: true }) // Trigger registerOnChange custom function by calling form.updateValueAndValidity 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 d08320c6bb..df4401c026 100644 --- a/src/app/register2/components/backend-error/backend-error.component.html +++ b/src/app/register2/components/backend-error/backend-error.component.html @@ -1,4 +1,6 @@ - + This email already exists in our system. Would you like to diff --git a/src/app/register2/components/backend-error/backend-error.component.ts b/src/app/register2/components/backend-error/backend-error.component.ts index 6e36e49331..dabc88c937 100644 --- a/src/app/register2/components/backend-error/backend-error.component.ts +++ b/src/app/register2/components/backend-error/backend-error.component.ts @@ -29,6 +29,8 @@ enum RegisterBackendErrors { export class BackendErrorComponent implements OnInit { recognizedError = RegisterBackendErrors _errorCode: string + @Input() disableInlineAlreadyExistError = false + @Input() set errorCode(errorCode: string) { // This will change the string send by the backend into a code, to handle the error trough a code diff --git a/src/app/register2/components/form-notifications/form-notifications.component.scss b/src/app/register2/components/form-notifications/form-notifications.component.scss index 58207ec0a4..c3504845c5 100644 --- a/src/app/register2/components/form-notifications/form-notifications.component.scss +++ b/src/app/register2/components/form-notifications/form-notifications.component.scss @@ -1,3 +1,8 @@ :host { max-width: 100%; + ::ng-deep { + label { + white-space: initial; + } + } } 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 2cf0446f95..6b0e40b6b6 100644 --- a/src/app/register2/components/form-personal/form-personal.component.html +++ b/src/app/register2/components/form-personal/form-personal.component.html @@ -92,7 +92,7 @@

class="orc-font-small-print" id="email-input-input-label" [ngClass]="{ - error: emailFormTouched && form.hasError('required', 'emails.email') + error: emailFormTouched && emails.controls.email.errors }" id="email-input-label" i18n="@@register.primaryEmail" @@ -124,8 +124,9 @@

@@ -141,6 +142,7 @@

*ngFor="let error of this.emails.getError('backendError', 'email')" > @@ -173,7 +175,7 @@

Sign in to ORCID using this email address { + return this._router.navigate([ApplicationRoutes.signin], { + // keeps all parameters to support Oauth request + // and set show login to true + queryParams: { ...platform.queryParameters, email, show_login: true }, + }) + }) + } } diff --git a/src/app/register2/components/register2.scss-theme.scss b/src/app/register2/components/register2.scss-theme.scss index 7f860f7666..1cdd3193b5 100644 --- a/src/app/register2/components/register2.scss-theme.scss +++ b/src/app/register2/components/register2.scss-theme.scss @@ -70,15 +70,6 @@ } } - :host { - ::ng-deep { - .container .mat-horizontal-content-container, - .container { - background-color: map-get($background, 'ui-background-lightest'); - } - } - } - ::ng-deep { .valid-password-input { mat-icon { diff --git a/src/app/register2/components/register2.style.scss b/src/app/register2/components/register2.style.scss index 427a9d30f6..2cea556c31 100644 --- a/src/app/register2/components/register2.style.scss +++ b/src/app/register2/components/register2.style.scss @@ -58,6 +58,10 @@ mat-label.orc-font-small-print { } :host ::ng-deep { + mat-card { + margin-top: 32px !important; + } + mat-error { margin-top: 8px; font-size: 12px; diff --git a/src/app/register2/pages/register/register2.component.html b/src/app/register2/pages/register/register2.component.html index db7dcf6ef1..84918f637a 100644 --- a/src/app/register2/pages/register/register2.component.html +++ b/src/app/register2/pages/register/register2.component.html @@ -7,6 +7,7 @@ #stepper labelPosition="bottom" class="orcid-stepper-wizard" + (selectionChange)="selectionChange($event)" > Visibility and terms