mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
[CST-15074][#3355] Resolved conflicts and updated control-flow syntax
This commit is contained in:
@@ -12,26 +12,17 @@
|
|||||||
class="form-control form-control-lg position-relative"
|
class="form-control form-control-lg position-relative"
|
||||||
[attr.aria-label]="'external-login.confirmation.email-label' | translate"
|
[attr.aria-label]="'external-login.confirmation.email-label' | translate"
|
||||||
/>
|
/>
|
||||||
<div
|
@if (emailForm.get('email').hasError('required') && emailForm.get('email').touched) {
|
||||||
*ngIf="
|
<div class="text-danger">
|
||||||
emailForm.get('email').hasError('required') &&
|
|
||||||
emailForm.get('email').touched
|
|
||||||
"
|
|
||||||
class="text-danger"
|
|
||||||
>
|
|
||||||
{{ "external-login.confirmation.email-required" | translate }}
|
{{ "external-login.confirmation.email-required" | translate }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
}
|
||||||
*ngIf="
|
@if (emailForm.get('email').hasError('email') && emailForm.get('email').touched) {
|
||||||
emailForm.get('email').hasError('email') &&
|
<div class="text-danger">
|
||||||
emailForm.get('email').touched
|
|
||||||
"
|
|
||||||
class="text-danger"
|
|
||||||
>
|
|
||||||
{{ "external-login.confirmation.email-invalid" | translate }}
|
{{ "external-login.confirmation.email-invalid" | translate }}
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="submit" class="btn btn-lg btn-primary btn-block">
|
<button type="submit" class="btn btn-lg btn-primary btn-block">
|
||||||
{{ "external-login.confirm.button.label" | translate }}
|
{{ "external-login.confirm.button.label" | translate }}
|
||||||
</button>
|
</button>
|
||||||
|
@@ -12,24 +12,16 @@
|
|||||||
[attr.aria-label]="'external-login.confirmation.email' | translate"
|
[attr.aria-label]="'external-login.confirmation.email' | translate"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<div
|
@if (emailForm.get('email').hasError('required') && emailForm.get('email').touched) {
|
||||||
*ngIf="
|
<div class="text-danger">
|
||||||
emailForm.get('email').hasError('required') &&
|
|
||||||
emailForm.get('email').touched
|
|
||||||
"
|
|
||||||
class="text-danger"
|
|
||||||
>
|
|
||||||
{{ "external-login.confirmation.email-required" | translate }}
|
{{ "external-login.confirmation.email-required" | translate }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
}
|
||||||
*ngIf="
|
@if (emailForm.get('email').hasError('email') && emailForm.get('email').touched) {
|
||||||
emailForm.get('email').hasError('email') &&
|
<div class="text-danger">
|
||||||
emailForm.get('email').touched
|
|
||||||
"
|
|
||||||
class="text-danger"
|
|
||||||
>
|
|
||||||
{{ "external-login.confirmation.email-invalid" | translate }}
|
{{ "external-login.confirmation.email-invalid" | translate }}
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button type="submit" class="btn btn-lg btn-primary btn-block">
|
<button type="submit" class="btn btn-lg btn-primary btn-block">
|
||||||
|
@@ -10,12 +10,11 @@
|
|||||||
</ds-alert>
|
</ds-alert>
|
||||||
<div class="row justify-content-center">
|
<div class="row justify-content-center">
|
||||||
<div class="col-4 d-flex justify-content-end align-items-center">
|
<div class="col-4 d-flex justify-content-end align-items-center">
|
||||||
<ng-container *ngIf="registrationData.email; else provideEmail">
|
@if (registrationData.email) {
|
||||||
<ds-confirm-email [registrationData]="registrationData" [token]="token"></ds-confirm-email>
|
<ds-confirm-email [registrationData]="registrationData" [token]="token"></ds-confirm-email>
|
||||||
</ng-container>
|
} @else {
|
||||||
<ng-template #provideEmail>
|
|
||||||
<ds-provide-email [registrationId]="registrationData.id" [token]="token"></ds-provide-email>
|
<ds-provide-email [registrationId]="registrationData.id" [token]="token"></ds-provide-email>
|
||||||
</ng-template>
|
}
|
||||||
</div>
|
</div>
|
||||||
<div class="col-1 align-items-center d-flex justify-content-center">
|
<div class="col-1 align-items-center d-flex justify-content-center">
|
||||||
<h4 class="mt-2">{{ 'external-login.component.or' | translate }}</h4>
|
<h4 class="mt-2">{{ 'external-login.component.or' | translate }}</h4>
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
formControlName="firstname"
|
formControlName="firstname"
|
||||||
type="text"
|
type="text"
|
||||||
[attr.data-test]="'firstname' | dsBrowserOnly">
|
[attr.data-test]="'firstname' | dsBrowserOnly">
|
||||||
<ng-container *ngIf="registrationData?.email">
|
@if (registrationData?.email) {
|
||||||
<label class="font-weight-bold mb-0">{{"external-login-page.orcid-confirmation.email" | translate}}</label>
|
<label class="font-weight-bold mb-0">{{"external-login-page.orcid-confirmation.email" | translate}}</label>
|
||||||
<input [attr.aria-label]="'external-login-page.orcid-confirmation.email.label' | translate"
|
<input [attr.aria-label]="'external-login-page.orcid-confirmation.email.label' | translate"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
@@ -31,5 +31,5 @@
|
|||||||
formControlName="email"
|
formControlName="email"
|
||||||
type="email"
|
type="email"
|
||||||
[attr.data-test]="'email' | dsBrowserOnly">
|
[attr.data-test]="'email' | dsBrowserOnly">
|
||||||
</ng-container>
|
}
|
||||||
</form>
|
</form>
|
||||||
|
@@ -1,11 +1,12 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<ng-container *ngIf="(registrationData$ | async)">
|
@if (registrationData$ | async; as registrationData) {
|
||||||
<ds-external-log-in [registrationData]="registrationData$ | async" [token]="token"></ds-external-log-in>
|
<ds-external-log-in [registrationData]="registrationData" [token]="token"></ds-external-log-in>
|
||||||
</ng-container>
|
}
|
||||||
|
|
||||||
|
@if (hasErrors) {
|
||||||
<ds-alert
|
<ds-alert
|
||||||
*ngIf="hasErrors"
|
|
||||||
[type]="AlertTypeEnum.Error"
|
[type]="AlertTypeEnum.Error"
|
||||||
[content]="'external-login.error.notification' | translate"
|
[content]="'external-login.error.notification' | translate"
|
||||||
></ds-alert>
|
></ds-alert>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,13 +1,14 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<ng-container *ngIf="(registrationData$ | async)">
|
@if (registrationData$ | async; as registrationData) {
|
||||||
<ds-review-account-info
|
<ds-review-account-info
|
||||||
[registrationToken]="token"
|
[registrationToken]="token"
|
||||||
[registrationData]="registrationData$ | async"
|
[registrationData]="registrationData"
|
||||||
></ds-review-account-info>
|
></ds-review-account-info>
|
||||||
</ng-container>
|
}
|
||||||
|
@if (hasErrors) {
|
||||||
<ds-alert
|
<ds-alert
|
||||||
*ngIf="hasErrors"
|
|
||||||
[type]="AlertTypeEnum.Error"
|
[type]="AlertTypeEnum.Error"
|
||||||
[content]="'review-account-info.alert.error.content'"
|
[content]="'review-account-info.alert.error.content'"
|
||||||
></ds-alert>
|
></ds-alert>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
|
@@ -28,7 +28,8 @@
|
|||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr *ngFor="let data of dataToCompare">
|
@for (data of dataToCompare; track data) {
|
||||||
|
<tr>
|
||||||
<th scope="row">{{ data.label | titlecase }}</th>
|
<th scope="row">{{ data.label | titlecase }}</th>
|
||||||
<td>{{ data.receivedValue }}</td>
|
<td>{{ data.receivedValue }}</td>
|
||||||
<td>
|
<td>
|
||||||
@@ -40,18 +41,19 @@
|
|||||||
</span>
|
</span>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
|
@if ((data.receivedValue !== data.currentValue) && data.currentValue) {
|
||||||
<ui-switch
|
<ui-switch
|
||||||
*ngIf="(data.receivedValue !== data.currentValue) && data.currentValue"
|
|
||||||
[checkedLabel]="'on-label' | translate"
|
[checkedLabel]="'on-label' | translate"
|
||||||
[uncheckedLabel]="'off-label' | translate"
|
[uncheckedLabel]="'off-label' | translate"
|
||||||
[checked]="data.overrideValue"
|
[checked]="data.overrideValue"
|
||||||
(change)="onOverrideChange($event, data.identifier)"
|
(change)="onOverrideChange($event, data.identifier)"
|
||||||
></ui-switch>
|
></ui-switch>
|
||||||
|
}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table> <div class="d-flex justify-content-end">
|
||||||
<div class="d-flex justify-content-end">
|
|
||||||
<button class="btn btn-primary" (click)="onSave()">
|
<button class="btn btn-primary" (click)="onSave()">
|
||||||
{{'confirmation-modal.review-account-info.confirm' | translate}}
|
{{'confirmation-modal.review-account-info.confirm' | translate}}
|
||||||
</button>
|
</button>
|
||||||
|
@@ -27,7 +27,6 @@ import { hasValue } from '../empty.util';
|
|||||||
import { ThemedLoadingComponent } from '../loading/themed-loading.component';
|
import { ThemedLoadingComponent } from '../loading/themed-loading.component';
|
||||||
import { LogInContainerComponent } from './container/log-in-container.component';
|
import { LogInContainerComponent } from './container/log-in-container.component';
|
||||||
import { rendersAuthMethodType } from './methods/log-in.methods-decorator';
|
import { rendersAuthMethodType } from './methods/log-in.methods-decorator';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-base-log-in',
|
selector: 'ds-base-log-in',
|
||||||
@@ -35,7 +34,7 @@ import { TranslateModule } from '@ngx-translate/core';
|
|||||||
styleUrls: ['./log-in.component.scss'],
|
styleUrls: ['./log-in.component.scss'],
|
||||||
changeDetection: ChangeDetectionStrategy.OnPush,
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
||||||
standalone: true,
|
standalone: true,
|
||||||
imports: [ThemedLoadingComponent, LogInContainerComponent, AsyncPipe, TranslateModule],
|
imports: [ThemedLoadingComponent, LogInContainerComponent, AsyncPipe],
|
||||||
})
|
})
|
||||||
export class LogInComponent implements OnInit {
|
export class LogInComponent implements OnInit {
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user