Skip to content

Commit

Permalink
batch-fixes-4-dec
Browse files Browse the repository at this point in the history
  • Loading branch information
leomendoza123 committed Dec 4, 2023
1 parent 17b13cc commit 5455006
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/app/core/register2/register2.form-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export function Register2FormAdapterMixin<T extends Constructor<any>>(base: T) {
return {
...StepA.value.personal,
...StepB.value.password,
...StepB.value.sendOrcidNews,
...StepC.value.sendOrcidNews,
...StepD.value.activitiesVisibilityDefault,
...StepD.value.termsOfUse,
...StepD.value.captcha,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ <h2 i18n="@@register.yourEmailAddresses" class="orc-font-body margin-top-12">

<div>
<a
routerLink="/signin"
(click)="navigateToSignin(emails.get('email').value)"
i18n="@@register.signInToOrcidUsingThisEmail"
>
Sign in to ORCID using this email address</a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,15 @@ import {
first,
startWith,
switchMap,
take,
} from 'rxjs/operators'
import { ReactivationService } from '../../../core/reactivation/reactivation.service'
import { ReactivationLocal } from '../../../types/reactivation.local'
import { BaseForm } from '../BaseForm'
import { ErrorStateMatcher } from '@angular/material/core'
import { PlatformInfoService } from 'src/app/cdk/platform-info'
import { Router } from '@angular/router'
import { ApplicationRoutes } from 'src/app/constants'
export class MyErrorStateMatcher implements ErrorStateMatcher {
isErrorState(
control: FormControl | null,
Expand Down Expand Up @@ -87,7 +91,9 @@ export class FormPersonalComponent extends BaseForm implements OnInit {
undefinedEmail: boolean
constructor(
private _register: Register2Service,
private _reactivationService: ReactivationService
private _reactivationService: ReactivationService,
private _platform: PlatformInfoService,
private _router: Router
) {
super()
}
Expand Down Expand Up @@ -262,4 +268,20 @@ export class FormPersonalComponent extends BaseForm implements OnInit {
get emailsAreValid() {
return this.emailConfirmationValid && this.emailValid
}


navigateToSignin(email) {
this._platform
.get()
.pipe(take(1))
.subscribe((platform) => {
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 },
})
})
}


}
2 changes: 1 addition & 1 deletion src/app/register2/components/register2.scss-theme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
::ng-deep {
.container .mat-horizontal-content-container,
.container {
background-color: map-get($background, 'ui-background-lightest');
// background-color: map-get($background, 'ui-background-lightest');
}
}
}
Expand Down
7 changes: 7 additions & 0 deletions src/app/register2/components/register2.style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ mat-label.orc-font-small-print {
}

:host ::ng-deep {


mat-card {
margin-top: 32px !important;
}

mat-error {
margin-top: 8px;
font-size: 12px;
Expand Down Expand Up @@ -161,6 +167,7 @@ mat-label.orc-font-small-print {
margin-bottom: 0px;
}


mat-vertical-stepper.orcid-stepper-wizard,
mat-horizontal-stepper.orcid-stepper-wizard {
mat-card {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
$background: map-get($theme, background);

:host {
background-color: map-get($background, 'ui-background-lightest');
// background-color: map-get($background, 'ui-background-lightest');
}
}
@include theme($orcid-app-theme);

0 comments on commit 5455006

Please sign in to comment.