Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8975 qa no error menssage on addional email #2118

Merged
merged 4 commits into from
Dec 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[Full Changelog](https://github.com/ORCID/orcid-angular/compare/v2.51.11...v2.51.12)

- [#2116](https://github.com/ORCID/orcid-angular/pull/2116):
- [#2116](https://github.com/ORCID/orcid-angular/pull/2116):

### Fix

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
<ng-container *ngIf="recognizedError[errorCode] === 0">
<ng-container *ngIf="!registrationTogglz">
<ng-container i18n="@@register.emailAlreadyExists"
>This email already exists in our system. Would you like to</ng-container
>

<a (click)="navigateToSignin(value)" i18n="@@register.signinLowerCase"
>sign in</a
><ng-container i18n="@@shared.questionMark">?</ng-container>
</ng-container>

<ng-container *ngIf="registrationTogglz && nextButtonWasClicked">
<ng-container
*ngIf="
(showEmailAlreadyExistUntilNextButtonWasClicked &&
nextButtonWasClicked) ||
!showEmailAlreadyExistUntilNextButtonWasClicked
"
>
<ng-container i18n="@@register.emailIsAlreadyAssociated"
>This email is already associated with an existing ORCID record. Please
use a different email address.</ng-container
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export class BackendErrorComponent implements OnInit {
recognizedError = RegisterBackendErrors
_errorCode: string
@Input() nextButtonWasClicked = false
@Input() showEmailAlreadyExistUntilNextButtonWasClicked = false
registrationTogglz = false

@Input()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
index as i
"
>
<mat-label class="orc-font-small-print" id="additional-email-label">
<mat-label
class="orc-font-small-print"
id="additional-email-label"
[ngClass]="{
error: additionalEmailsTouched && additionalEmails.valid === false
}"
>
<ng-container i18n="@@register.additionalEmails"
>Additional email</ng-container
>
Expand Down Expand Up @@ -36,19 +42,21 @@
>
Please enter a valid email address, for example [email protected]
</mat-error>
<mat-error
*ngFor="
let error of getControlErrorAtFormLevel(
additionalEmailControl.value,
'backendErrors'
)
"
>
<app-backend-error
[errorCode]="error"
[value]="additionalEmailControl.value.value"
></app-backend-error>
</mat-error>
<ng-container *ngIf="additionalEmailsTouched">
<mat-error
*ngFor="
let error of getControlErrorAtFormLevel(
additionalEmailControl.value,
'backendErrors'
)
"
>
<app-backend-error
[errorCode]="error"
[value]="additionalEmailControl.value.value"
></app-backend-error>
</mat-error>
</ng-container>

<!-- <button
*ngIf="i == 0"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { ErrorStateMatcherForFormLevelErrors } from '../../ErrorStateMatcherForF
styleUrls: [
'./form-personal-additional-emails.component.scss',
'../register2.style.scss',
'../register2.scss-theme.scss',
],
})
export class FormPersonalAdditionalEmailsComponent implements AfterViewInit {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ <h3 i18n="@@register.yourEmailAddresses" class="orc-font-body margin-top-12">
*ngFor="let error of this.emails.getError('backendError', 'email')"
>
<app-backend-error
[showEmailAlreadyExistUntilNextButtonWasClicked]="true"
[nextButtonWasClicked]="nextButtonWasClicked"
[errorCode]="error"
[value]="emails.get('email').value"
Expand Down