Skip to content

Commit

Permalink
8975 qa no error menssage on addional email (#2118)
Browse files Browse the repository at this point in the history
* 8975-qa-no-error-menssage-on-addional-email

* 8975-qa-no-error-menssage-on-addional-email

* 8975-qa-no-error-menssage-on-addional-email

* 8975-qa-no-error-menssage-on-addional-email
  • Loading branch information
leomendoza123 authored Dec 8, 2023
1 parent 39be027 commit 4188d65
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 26 deletions.
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

0 comments on commit 4188d65

Please sign in to comment.