@@ -122,7 +122,7 @@
diff --git a/src/app/access-control/group-registry/group-form/members-list/members-list.component.ts b/src/app/access-control/group-registry/group-form/members-list/members-list.component.ts
index 9b123ae447..22934394c8 100644
--- a/src/app/access-control/group-registry/group-form/members-list/members-list.component.ts
+++ b/src/app/access-control/group-registry/group-form/members-list/members-list.component.ts
@@ -54,6 +54,7 @@ import {
getFirstCompletedRemoteData,
getRemoteDataPayload,
} from '../../../../core/shared/operators';
+import { BtnDisabledDirective } from '../../../../shared/btn-disabled.directive';
import { ContextHelpDirective } from '../../../../shared/context-help.directive';
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
import { PaginationComponent } from '../../../../shared/pagination/pagination.component';
@@ -113,6 +114,7 @@ export interface EPersonListActionConfig {
RouterLink,
NgClass,
NgForOf,
+ BtnDisabledDirective,
],
standalone: true,
})
diff --git a/src/app/access-control/group-registry/groups-registry.component.html b/src/app/access-control/group-registry/groups-registry.component.html
index c2d998d954..4150e2560c 100644
--- a/src/app/access-control/group-registry/groups-registry.component.html
+++ b/src/app/access-control/group-registry/groups-registry.component.html
@@ -69,7 +69,7 @@
{
imports: [CommonModule, NgbModule, FormsModule, ReactiveFormsModule, BrowserModule,
TranslateModule.forRoot(),
GroupsRegistryComponent,
+ BtnDisabledDirective,
],
providers: [GroupsRegistryComponent,
{ provide: DSONameService, useValue: new DSONameServiceMock() },
@@ -278,7 +280,8 @@ describe('GroupsRegistryComponent', () => {
const editButtonsFound = fixture.debugElement.queryAll(By.css('#groups tr td:nth-child(5) button.btn-edit'));
expect(editButtonsFound.length).toEqual(2);
editButtonsFound.forEach((editButtonFound) => {
- expect(editButtonFound.nativeElement.disabled).toBeFalse();
+ expect(editButtonFound.nativeElement.getAttribute('aria-disabled')).toBeNull();
+ expect(editButtonFound.nativeElement.classList.contains('disabled')).toBeFalse();
});
});
@@ -312,7 +315,8 @@ describe('GroupsRegistryComponent', () => {
const editButtonsFound = fixture.debugElement.queryAll(By.css('#groups tr td:nth-child(5) button.btn-edit'));
expect(editButtonsFound.length).toEqual(2);
editButtonsFound.forEach((editButtonFound) => {
- expect(editButtonFound.nativeElement.disabled).toBeFalse();
+ expect(editButtonFound.nativeElement.getAttribute('aria-disabled')).toBeNull();
+ expect(editButtonFound.nativeElement.classList.contains('disabled')).toBeFalse();
});
});
});
@@ -331,7 +335,8 @@ describe('GroupsRegistryComponent', () => {
const editButtonsFound = fixture.debugElement.queryAll(By.css('#groups tr td:nth-child(5) button.btn-edit'));
expect(editButtonsFound.length).toEqual(2);
editButtonsFound.forEach((editButtonFound) => {
- expect(editButtonFound.nativeElement.disabled).toBeTrue();
+ expect(editButtonFound.nativeElement.getAttribute('aria-disabled')).toBe('true');
+ expect(editButtonFound.nativeElement.classList.contains('disabled')).toBeTrue();
});
});
});
diff --git a/src/app/access-control/group-registry/groups-registry.component.ts b/src/app/access-control/group-registry/groups-registry.component.ts
index dec3dc955d..07b7317a1e 100644
--- a/src/app/access-control/group-registry/groups-registry.component.ts
+++ b/src/app/access-control/group-registry/groups-registry.component.ts
@@ -62,6 +62,7 @@ import {
getRemoteDataPayload,
} from '../../core/shared/operators';
import { PageInfo } from '../../core/shared/page-info.model';
+import { BtnDisabledDirective } from '../../shared/btn-disabled.directive';
import { hasValue } from '../../shared/empty.util';
import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component';
import { NotificationsService } from '../../shared/notifications/notifications.service';
@@ -84,6 +85,7 @@ import { followLink } from '../../shared/utils/follow-link-config.model';
NgSwitchCase,
NgbTooltipModule,
NgForOf,
+ BtnDisabledDirective,
],
standalone: true,
})
diff --git a/src/app/admin/admin-reports/filtered-items/filtered-items.component.html b/src/app/admin/admin-reports/filtered-items/filtered-items.component.html
index 4b6679bdbc..a765c4a190 100644
--- a/src/app/admin/admin-reports/filtered-items/filtered-items.component.html
+++ b/src/app/admin/admin-reports/filtered-items/filtered-items.component.html
@@ -54,7 +54,7 @@
+
- –
+ –
@@ -158,8 +158,8 @@
{{'admin.reports.commons.page' | translate}} {{ currentPage + 1 }} {{'admin.reports.commons.of' | translate}} {{ pageCount() }}
-
{{'admin.reports.commons.previous-page' | translate}}
-
{{'admin.reports.commons.next-page' | translate}}
+
{{'admin.reports.commons.previous-page' | translate}}
+
{{'admin.reports.commons.next-page' | translate}}
diff --git a/src/app/admin/admin-reports/filtered-items/filtered-items.component.ts b/src/app/admin/admin-reports/filtered-items/filtered-items.component.ts
index 4cb93aa9be..04ee4894ec 100644
--- a/src/app/admin/admin-reports/filtered-items/filtered-items.component.ts
+++ b/src/app/admin/admin-reports/filtered-items/filtered-items.component.ts
@@ -43,6 +43,7 @@ import { getFirstSucceededRemoteListPayload } from 'src/app/core/shared/operator
import { isEmpty } from 'src/app/shared/empty.util';
import { environment } from 'src/environments/environment';
+import { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
import { FiltersComponent } from '../filters-section/filters-section.component';
import { FilteredItems } from './filtered-items-model';
import { OptionVO } from './option-vo.model';
@@ -64,6 +65,7 @@ import { QueryPredicate } from './query-predicate.model';
NgIf,
NgForOf,
FiltersComponent,
+ BtnDisabledDirective,
],
standalone: true,
})
diff --git a/src/app/collection-page/delete-collection-page/delete-collection-page.component.html b/src/app/collection-page/delete-collection-page/delete-collection-page.component.html
index 53c3b45cfa..0cdba00f03 100644
--- a/src/app/collection-page/delete-collection-page/delete-collection-page.component.html
+++ b/src/app/collection-page/delete-collection-page/delete-collection-page.component.html
@@ -6,10 +6,10 @@
{{ 'collection.delete.text' | translate:{ dso: dsoNameService.getName(dso) } }}
-
+
{{'collection.delete.cancel' | translate}}
-
+
{{'collection.delete.processing' | translate}}
{{'collection.delete.confirm' | translate}}
diff --git a/src/app/collection-page/delete-collection-page/delete-collection-page.component.ts b/src/app/collection-page/delete-collection-page/delete-collection-page.component.ts
index dbb5f8846f..acc716b52a 100644
--- a/src/app/collection-page/delete-collection-page/delete-collection-page.component.ts
+++ b/src/app/collection-page/delete-collection-page/delete-collection-page.component.ts
@@ -15,6 +15,7 @@ import {
import { DSONameService } from '../../core/breadcrumbs/dso-name.service';
import { CollectionDataService } from '../../core/data/collection-data.service';
import { Collection } from '../../core/shared/collection.model';
+import { BtnDisabledDirective } from '../../shared/btn-disabled.directive';
import { DeleteComColPageComponent } from '../../shared/comcol/comcol-forms/delete-comcol-page/delete-comcol-page.component';
import { NotificationsService } from '../../shared/notifications/notifications.service';
import { VarDirective } from '../../shared/utils/var.directive';
@@ -31,6 +32,7 @@ import { VarDirective } from '../../shared/utils/var.directive';
AsyncPipe,
NgIf,
VarDirective,
+ BtnDisabledDirective,
],
standalone: true,
})
diff --git a/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.html b/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.html
index 7edaadb0a1..1e09758bd1 100644
--- a/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.html
+++ b/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.html
@@ -19,32 +19,32 @@
{{'collection.source.controls.test.submit' | translate}}
+ [dsBtnDisabled]="true">
{{'collection.source.controls.test.running' | translate}}
{{'collection.source.controls.import.submit' | translate}}
+ [dsBtnDisabled]="true">
{{'collection.source.controls.import.running' | translate}}
{{'collection.source.controls.reset.submit' | translate}}
+ [dsBtnDisabled]="true">
{{'collection.source.controls.reset.running' | translate}}
diff --git a/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.spec.ts b/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.spec.ts
index 0caf9b0418..cbe3de1483 100644
--- a/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.spec.ts
+++ b/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.spec.ts
@@ -22,6 +22,7 @@ import { Collection } from '../../../../core/shared/collection.model';
import { ContentSource } from '../../../../core/shared/content-source.model';
import { ContentSourceSetSerializer } from '../../../../core/shared/content-source-set-serializer';
import { Process } from '../../../../process-page/processes/process.model';
+import { BtnDisabledDirective } from '../../../../shared/btn-disabled.directive';
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
import { createSuccessfulRemoteDataObject$ } from '../../../../shared/remote-data.utils';
import { NotificationsServiceStub } from '../../../../shared/testing/notifications-service.stub';
@@ -104,7 +105,7 @@ describe('CollectionSourceControlsComponent', () => {
requestService = jasmine.createSpyObj('requestService', ['removeByHrefSubstring', 'setStaleByHrefSubstring']);
TestBed.configureTestingModule({
- imports: [TranslateModule.forRoot(), RouterTestingModule, CollectionSourceControlsComponent, VarDirective],
+ imports: [TranslateModule.forRoot(), RouterTestingModule, CollectionSourceControlsComponent, VarDirective, BtnDisabledDirective],
providers: [
{ provide: ScriptDataService, useValue: scriptDataService },
{ provide: ProcessDataService, useValue: processDataService },
@@ -193,9 +194,10 @@ describe('CollectionSourceControlsComponent', () => {
const buttons = fixture.debugElement.queryAll(By.css('button'));
- expect(buttons[0].nativeElement.disabled).toBeTrue();
- expect(buttons[1].nativeElement.disabled).toBeTrue();
- expect(buttons[2].nativeElement.disabled).toBeTrue();
+ buttons.forEach(button => {
+ expect(button.nativeElement.getAttribute('aria-disabled')).toBe('true');
+ expect(button.nativeElement.classList.contains('disabled')).toBeTrue();
+ });
});
it('should be enabled when isEnabled is true', () => {
comp.shouldShow = true;
@@ -205,9 +207,10 @@ describe('CollectionSourceControlsComponent', () => {
const buttons = fixture.debugElement.queryAll(By.css('button'));
- expect(buttons[0].nativeElement.disabled).toBeFalse();
- expect(buttons[1].nativeElement.disabled).toBeFalse();
- expect(buttons[2].nativeElement.disabled).toBeFalse();
+ buttons.forEach(button => {
+ expect(button.nativeElement.getAttribute('aria-disabled')).toBe('false');
+ expect(button.nativeElement.classList.contains('disabled')).toBeFalse();
+ });
});
it('should call the corresponding button when clicked', () => {
spyOn(comp, 'testConfiguration');
diff --git a/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.ts b/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.ts
index fdd65a43c7..e35a64af16 100644
--- a/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.ts
+++ b/src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.ts
@@ -40,6 +40,7 @@ import {
} from '../../../../core/shared/operators';
import { Process } from '../../../../process-page/processes/process.model';
import { ProcessStatus } from '../../../../process-page/processes/process-status.model';
+import { BtnDisabledDirective } from '../../../../shared/btn-disabled.directive';
import { hasValue } from '../../../../shared/empty.util';
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
import { VarDirective } from '../../../../shared/utils/var.directive';
@@ -56,6 +57,7 @@ import { VarDirective } from '../../../../shared/utils/var.directive';
AsyncPipe,
NgIf,
VarDirective,
+ BtnDisabledDirective,
],
standalone: true,
})
diff --git a/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.html b/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.html
index 8f807c1aee..7aa1f1a8b7 100644
--- a/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.html
+++ b/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.html
@@ -1,7 +1,7 @@
{{"item.edit.metadata.discard-button" | translate}}
@@ -12,7 +12,7 @@
{{"item.edit.metadata.reinstate-button" | translate}}
{{"item.edit.metadata.save-button" | translate}}
@@ -45,7 +45,7 @@
{{"item.edit.metadata.discard-button" | translate}}
@@ -56,7 +56,7 @@
{{"item.edit.metadata.reinstate-button" | translate}}
{{"item.edit.metadata.save-button" | translate}}
diff --git a/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.ts b/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.ts
index 43614e43a6..afeb2e2352 100644
--- a/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.ts
+++ b/src/app/collection-page/edit-collection-page/collection-source/collection-source.component.ts
@@ -56,6 +56,7 @@ import {
getFirstCompletedRemoteData,
getFirstSucceededRemoteData,
} from '../../../core/shared/operators';
+import { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
import {
hasNoValue,
hasValue,
@@ -81,6 +82,7 @@ import { CollectionSourceControlsComponent } from './collection-source-controls/
ThemedLoadingComponent,
FormComponent,
CollectionSourceControlsComponent,
+ BtnDisabledDirective,
],
standalone: true,
})
diff --git a/src/app/community-page/delete-community-page/delete-community-page.component.html b/src/app/community-page/delete-community-page/delete-community-page.component.html
index b241a7027c..b5d215e3b6 100644
--- a/src/app/community-page/delete-community-page/delete-community-page.component.html
+++ b/src/app/community-page/delete-community-page/delete-community-page.component.html
@@ -6,10 +6,10 @@
{{ 'community.delete.text' | translate:{ dso: dsoNameService.getName(dso) } }}
-
diff --git a/src/app/shared/subscriptions/subscription-view/subscription-view.component.ts b/src/app/shared/subscriptions/subscription-view/subscription-view.component.ts
index 001a2ed687..f940e69795 100644
--- a/src/app/shared/subscriptions/subscription-view/subscription-view.component.ts
+++ b/src/app/shared/subscriptions/subscription-view/subscription-view.component.ts
@@ -19,6 +19,7 @@ import { getDSORoute } from 'src/app/app-routing-paths';
import { DSONameService } from '../../../core/breadcrumbs/dso-name.service';
import { DSpaceObject } from '../../../core/shared/dspace-object.model';
+import { BtnDisabledDirective } from '../../btn-disabled.directive';
import { ConfirmationModalComponent } from '../../confirmation-modal/confirmation-modal.component';
import { hasValue } from '../../empty.util';
import { ThemedTypeBadgeComponent } from '../../object-collection/shared/badges/type-badge/themed-type-badge.component';
@@ -32,7 +33,7 @@ import { SubscriptionsDataService } from '../subscriptions-data.service';
templateUrl: './subscription-view.component.html',
styleUrls: ['./subscription-view.component.scss'],
standalone: true,
- imports: [NgIf, ThemedTypeBadgeComponent, RouterLink, NgFor, TranslateModule],
+ imports: [NgIf, ThemedTypeBadgeComponent, RouterLink, NgFor, TranslateModule, BtnDisabledDirective],
})
/**
* Table row representing a subscription that displays all information and action buttons to manage it
diff --git a/src/app/shared/upload/uploader/uploader.component.html b/src/app/shared/upload/uploader/uploader.component.html
index 4c1db13d13..ae7c07bbab 100644
--- a/src/app/shared/upload/uploader/uploader.component.html
+++ b/src/app/shared/upload/uploader/uploader.component.html
@@ -35,7 +35,7 @@
{{'uploader.queue-length' | translate}}: {{ uploader?.queue?.length }} | {{ uploader?.queue[0]?.file.name }}
-
+
diff --git a/src/app/shared/upload/uploader/uploader.component.ts b/src/app/shared/upload/uploader/uploader.component.ts
index fbab09be3e..fbafe811eb 100644
--- a/src/app/shared/upload/uploader/uploader.component.ts
+++ b/src/app/shared/upload/uploader/uploader.component.ts
@@ -27,6 +27,7 @@ import {
XSRF_REQUEST_HEADER,
XSRF_RESPONSE_HEADER,
} from '../../../core/xsrf/xsrf.constants';
+import { BtnDisabledDirective } from '../../btn-disabled.directive';
import {
hasValue,
isNotEmpty,
@@ -42,7 +43,7 @@ import { UploaderProperties } from './uploader-properties.model';
changeDetection: ChangeDetectionStrategy.Default,
encapsulation: ViewEncapsulation.Emulated,
standalone: true,
- imports: [TranslateModule, FileUploadModule, CommonModule],
+ imports: [TranslateModule, FileUploadModule, CommonModule, BtnDisabledDirective],
})
export class UploaderComponent implements OnInit, AfterViewInit {
diff --git a/src/app/submission/form/collection/submission-form-collection.component.html b/src/app/submission/form/collection/submission-form-collection.component.html
index 16370a5873..db33afc76a 100644
--- a/src/app/submission/form/collection/submission-form-collection.component.html
+++ b/src/app/submission/form/collection/submission-form-collection.component.html
@@ -25,7 +25,7 @@
class="btn btn-outline-primary"
(blur)="onClose()"
(click)="onClose()"
- [disabled]="(processingChange$ | async) || collectionModifiable === false || isReadonly"
+ [dsBtnDisabled]="(processingChange$ | async) || collectionModifiable === false || isReadonly"
ngbDropdownToggle>
{{ selectedCollectionName$ | async }}
diff --git a/src/app/submission/form/collection/submission-form-collection.component.spec.ts b/src/app/submission/form/collection/submission-form-collection.component.spec.ts
index 540c2ba561..3a5ae8a18d 100644
--- a/src/app/submission/form/collection/submission-form-collection.component.spec.ts
+++ b/src/app/submission/form/collection/submission-form-collection.component.spec.ts
@@ -30,6 +30,7 @@ import { JsonPatchOperationPathCombiner } from '../../../core/json-patch/builder
import { JsonPatchOperationsBuilder } from '../../../core/json-patch/builder/json-patch-operations-builder';
import { Collection } from '../../../core/shared/collection.model';
import { SubmissionJsonPatchOperationsService } from '../../../core/submission/submission-json-patch-operations.service';
+import { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
import { ThemedCollectionDropdownComponent } from '../../../shared/collection-dropdown/themed-collection-dropdown.component';
import { DSONameServiceMock } from '../../../shared/mocks/dso-name.service.mock';
import {
@@ -152,6 +153,7 @@ describe('SubmissionFormCollectionComponent Component', () => {
TranslateModule.forRoot(),
SubmissionFormCollectionComponent,
TestComponent,
+ BtnDisabledDirective,
],
providers: [
{ provide: DSONameService, useValue: new DSONameServiceMock() },
@@ -275,7 +277,8 @@ describe('SubmissionFormCollectionComponent Component', () => {
it('the dropdown button should be disabled when isReadonly is true', () => {
comp.isReadonly = true;
fixture.detectChanges();
- expect(dropdowBtn.nativeNode.attributes.disabled).toBeDefined();
+ expect(dropdowBtn.nativeNode.getAttribute('aria-disabled')).toBe('true');
+ expect(dropdowBtn.nativeNode.classList.contains('disabled')).toBeTrue();
});
it('should be simulated when the drop-down menu is closed', () => {
diff --git a/src/app/submission/form/collection/submission-form-collection.component.ts b/src/app/submission/form/collection/submission-form-collection.component.ts
index 2aec1c9e30..1736b474d5 100644
--- a/src/app/submission/form/collection/submission-form-collection.component.ts
+++ b/src/app/submission/form/collection/submission-form-collection.component.ts
@@ -34,6 +34,7 @@ import { Collection } from '../../../core/shared/collection.model';
import { getFirstSucceededRemoteDataPayload } from '../../../core/shared/operators';
import { SubmissionObject } from '../../../core/submission/models/submission-object.model';
import { SubmissionJsonPatchOperationsService } from '../../../core/submission/submission-json-patch-operations.service';
+import { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
import { CollectionDropdownComponent } from '../../../shared/collection-dropdown/collection-dropdown.component';
import { ThemedCollectionDropdownComponent } from '../../../shared/collection-dropdown/themed-collection-dropdown.component';
import {
@@ -57,6 +58,7 @@ import { SubmissionService } from '../../submission.service';
TranslateModule,
NgbDropdownModule,
ThemedCollectionDropdownComponent,
+ BtnDisabledDirective,
],
})
export class SubmissionFormCollectionComponent implements OnDestroy, OnChanges, OnInit {
diff --git a/src/app/submission/form/footer/submission-form-footer.component.html b/src/app/submission/form/footer/submission-form-footer.component.html
index f1162cea4d..c860fb557b 100644
--- a/src/app/submission/form/footer/submission-form-footer.component.html
+++ b/src/app/submission/form/footer/submission-form-footer.component.html
@@ -5,7 +5,7 @@
id="discard"
[attr.data-test]="'discard' | dsBrowserOnly"
class="btn btn-danger"
- [disabled]="(processingSaveStatus | async) || (processingDepositStatus | async)"
+ [dsBtnDisabled]="(processingSaveStatus | async) || (processingDepositStatus | async)"
(click)="$event.preventDefault();confirmDiscard(content)">
{{'submission.general.discard.submit' | translate}}
@@ -28,7 +28,7 @@
class="btn btn-secondary"
id="save"
[attr.data-test]="'save' | dsBrowserOnly"
- [disabled]="(processingSaveStatus | async) || (hasUnsavedModification | async) !== true"
+ [dsBtnDisabled]="(processingSaveStatus | async) || (hasUnsavedModification | async) !== true"
(click)="save($event)">
{{'submission.general.save' | translate}}
@@ -38,7 +38,7 @@
class="btn"
id="saveForLater"
[attr.data-test]="'save-for-later' | dsBrowserOnly"
- [disabled]="(processingSaveStatus | async) || (processingDepositStatus | async)"
+ [dsBtnDisabled]="(processingSaveStatus | async) || (processingDepositStatus | async)"
(click)="saveLater($event)">
{{'submission.general.save-later' | translate}}
@@ -47,7 +47,7 @@
id="deposit"
[attr.data-test]="'deposit' | dsBrowserOnly"
class="btn btn-success"
- [disabled]="(processingSaveStatus | async) || (processingDepositStatus | async)"
+ [dsBtnDisabled]="(processingSaveStatus | async) || (processingDepositStatus | async)"
(click)="deposit($event)">
{{'submission.general.deposit' | translate}}
diff --git a/src/app/submission/form/footer/submission-form-footer.component.spec.ts b/src/app/submission/form/footer/submission-form-footer.component.spec.ts
index 4c6d04c970..82bc309cc8 100644
--- a/src/app/submission/form/footer/submission-form-footer.component.spec.ts
+++ b/src/app/submission/form/footer/submission-form-footer.component.spec.ts
@@ -25,6 +25,7 @@ import { of as observableOf } from 'rxjs';
import { TestScheduler } from 'rxjs/testing';
import { SubmissionRestService } from '../../../core/submission/submission-rest.service';
+import { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
import { mockSubmissionId } from '../../../shared/mocks/submission.mock';
import { SubmissionRestServiceStub } from '../../../shared/testing/submission-rest-service.stub';
import { SubmissionServiceStub } from '../../../shared/testing/submission-service.stub';
@@ -51,6 +52,7 @@ describe('SubmissionFormFooterComponent', () => {
TranslateModule.forRoot(),
SubmissionFormFooterComponent,
TestComponent,
+ BtnDisabledDirective,
],
providers: [
{ provide: SubmissionService, useValue: submissionServiceStub },
@@ -227,7 +229,8 @@ describe('SubmissionFormFooterComponent', () => {
fixture.detectChanges();
const depositBtn: any = fixture.debugElement.query(By.css('.btn-success'));
- expect(depositBtn.nativeElement.disabled).toBeFalsy();
+ expect(depositBtn.nativeElement.getAttribute('aria-disabled')).toBe('false');
+ expect(depositBtn.nativeElement.classList.contains('disabled')).toBeFalse();
});
it('should not have deposit button disabled when submission is valid', () => {
@@ -236,7 +239,8 @@ describe('SubmissionFormFooterComponent', () => {
fixture.detectChanges();
const depositBtn: any = fixture.debugElement.query(By.css('.btn-success'));
- expect(depositBtn.nativeElement.disabled).toBeFalsy();
+ expect(depositBtn.nativeElement.getAttribute('aria-disabled')).toBe('false');
+ expect(depositBtn.nativeElement.classList.contains('disabled')).toBeFalse();
});
it('should disable save button when all modifications had been saved', () => {
@@ -244,7 +248,8 @@ describe('SubmissionFormFooterComponent', () => {
fixture.detectChanges();
const saveBtn: any = fixture.debugElement.query(By.css('#save'));
- expect(saveBtn.nativeElement.disabled).toBeTruthy();
+ expect(saveBtn.nativeElement.getAttribute('aria-disabled')).toBe('true');
+ expect(saveBtn.nativeElement.classList.contains('disabled')).toBeTrue();
});
it('should enable save button when there are not saved modifications', () => {
@@ -252,7 +257,8 @@ describe('SubmissionFormFooterComponent', () => {
fixture.detectChanges();
const saveBtn: any = fixture.debugElement.query(By.css('#save'));
- expect(saveBtn.nativeElement.disabled).toBeFalsy();
+ expect(saveBtn.nativeElement.getAttribute('aria-disabled')).toBe('false');
+ expect(saveBtn.nativeElement.classList.contains('disabled')).toBeFalse();
});
});
diff --git a/src/app/submission/form/footer/submission-form-footer.component.ts b/src/app/submission/form/footer/submission-form-footer.component.ts
index 712a944a84..8645003783 100644
--- a/src/app/submission/form/footer/submission-form-footer.component.ts
+++ b/src/app/submission/form/footer/submission-form-footer.component.ts
@@ -15,6 +15,7 @@ import { map } from 'rxjs/operators';
import { SubmissionRestService } from '../../../core/submission/submission-rest.service';
import { SubmissionScopeType } from '../../../core/submission/submission-scope-type';
+import { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
import { isNotEmpty } from '../../../shared/empty.util';
import { BrowserOnlyPipe } from '../../../shared/utils/browser-only.pipe';
import { SubmissionService } from '../../submission.service';
@@ -27,7 +28,7 @@ import { SubmissionService } from '../../submission.service';
styleUrls: ['./submission-form-footer.component.scss'],
templateUrl: './submission-form-footer.component.html',
standalone: true,
- imports: [CommonModule, BrowserOnlyPipe, TranslateModule],
+ imports: [CommonModule, BrowserOnlyPipe, TranslateModule, BtnDisabledDirective],
})
export class SubmissionFormFooterComponent implements OnChanges {
diff --git a/src/app/submission/form/section-add/submission-form-section-add.component.html b/src/app/submission/form/section-add/submission-form-section-add.component.html
index 0c7035c7f8..563044d270 100644
--- a/src/app/submission/form/section-add/submission-form-section-add.component.html
+++ b/src/app/submission/form/section-add/submission-form-section-add.component.html
@@ -6,7 +6,7 @@
{{ 'submission.sections.general.add-more' | translate }}
diff --git a/src/app/submission/form/section-add/submission-form-section-add.component.ts b/src/app/submission/form/section-add/submission-form-section-add.component.ts
index 4cf10e55d8..eeeda893f1 100644
--- a/src/app/submission/form/section-add/submission-form-section-add.component.ts
+++ b/src/app/submission/form/section-add/submission-form-section-add.component.ts
@@ -9,6 +9,7 @@ import { TranslateModule } from '@ngx-translate/core';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
+import { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
import { HostWindowService } from '../../../shared/host-window.service';
import { SectionDataObject } from '../../sections/models/section-data.model';
import { SectionsService } from '../../sections/sections.service';
@@ -22,7 +23,7 @@ import { SubmissionService } from '../../submission.service';
styleUrls: ['./submission-form-section-add.component.scss'],
templateUrl: './submission-form-section-add.component.html',
standalone: true,
- imports: [CommonModule, TranslateModule, NgbDropdownModule],
+ imports: [CommonModule, TranslateModule, NgbDropdownModule, BtnDisabledDirective],
})
export class SubmissionFormSectionAddComponent implements OnInit {
diff --git a/src/app/submission/import-external/import-external-searchbar/submission-import-external-searchbar.component.html b/src/app/submission/import-external/import-external-searchbar/submission-import-external-searchbar.component.html
index 7b5a2004d7..f5bde4e81a 100644
--- a/src/app/submission/import-external/import-external-searchbar/submission-import-external-searchbar.component.html
+++ b/src/app/submission/import-external/import-external-searchbar/submission-import-external-searchbar.component.html
@@ -23,6 +23,6 @@
{{'submission.import-external.source.loading' | translate}}
- {{'submission.import-external.search.button' | translate}}
+ {{'submission.import-external.search.button' | translate}}
diff --git a/src/app/submission/import-external/import-external-searchbar/submission-import-external-searchbar.component.ts b/src/app/submission/import-external/import-external-searchbar/submission-import-external-searchbar.component.ts
index aace4de79a..eb7a703cc2 100644
--- a/src/app/submission/import-external/import-external-searchbar/submission-import-external-searchbar.component.ts
+++ b/src/app/submission/import-external/import-external-searchbar/submission-import-external-searchbar.component.ts
@@ -36,6 +36,7 @@ import {
getFirstSucceededRemoteDataPayload,
} from '../../../core/shared/operators';
import { PageInfo } from '../../../core/shared/page-info.model';
+import { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
import { hasValue } from '../../../shared/empty.util';
import { HostWindowService } from '../../../shared/host-window.service';
import { createSuccessfulRemoteDataObject } from '../../../shared/remote-data.utils';
@@ -70,6 +71,7 @@ export interface ExternalSourceData {
InfiniteScrollModule,
NgbDropdownModule,
FormsModule,
+ BtnDisabledDirective,
],
standalone: true,
})
diff --git a/src/app/submission/sections/cc-license/submission-section-cc-licenses.component.ts b/src/app/submission/sections/cc-license/submission-section-cc-licenses.component.ts
index cc1925a4a6..a633e640ab 100644
--- a/src/app/submission/sections/cc-license/submission-section-cc-licenses.component.ts
+++ b/src/app/submission/sections/cc-license/submission-section-cc-licenses.component.ts
@@ -46,6 +46,7 @@ import {
import { WorkspaceitemSectionCcLicenseObject } from '../../../core/submission/models/workspaceitem-section-cc-license.model';
import { SubmissionCcLicenseDataService } from '../../../core/submission/submission-cc-license-data.service';
import { SubmissionCcLicenseUrlDataService } from '../../../core/submission/submission-cc-license-url-data.service';
+import { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
import { DsSelectComponent } from '../../../shared/ds-select/ds-select.component';
import { isNotEmpty } from '../../../shared/empty.util';
import { ThemedLoadingComponent } from '../../../shared/loading/themed-loading.component';
@@ -73,6 +74,7 @@ import { SectionsType } from '../sections-type';
NgbDropdownModule,
FormsModule,
InfiniteScrollModule,
+ BtnDisabledDirective,
],
standalone: true,
})
diff --git a/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.html b/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.html
index 0cb79e51cb..b03504c6be 100644
--- a/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.html
+++ b/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.html
@@ -1,7 +1,7 @@
diff --git a/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.ts b/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.ts
index 24488d1adb..79b3d3a565 100644
--- a/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.ts
+++ b/src/app/submission/sections/upload/file/edit/section-upload-file-edit.component.ts
@@ -38,6 +38,7 @@ import { JsonPatchOperationPathCombiner } from '../../../../../core/json-patch/b
import { JsonPatchOperationsBuilder } from '../../../../../core/json-patch/builder/json-patch-operations-builder';
import { WorkspaceitemSectionUploadFileObject } from '../../../../../core/submission/models/workspaceitem-section-upload-file.model';
import { SubmissionJsonPatchOperationsService } from '../../../../../core/submission/submission-json-patch-operations.service';
+import { BtnDisabledDirective } from '../../../../../shared/btn-disabled.directive';
import { dateToISOFormat } from '../../../../../shared/date.util';
import {
hasNoValue,
@@ -80,6 +81,7 @@ import {
FormComponent,
NgIf,
TranslateModule,
+ BtnDisabledDirective,
],
standalone: true,
})
diff --git a/src/app/submission/sections/upload/file/section-upload-file.component.html b/src/app/submission/sections/upload/file/section-upload-file.component.html
index 4698fdf68a..cd04542676 100644
--- a/src/app/submission/sections/upload/file/section-upload-file.component.html
+++ b/src/app/submission/sections/upload/file/section-upload-file.component.html
@@ -35,7 +35,7 @@
diff --git a/src/app/submission/sections/upload/file/section-upload-file.component.ts b/src/app/submission/sections/upload/file/section-upload-file.component.ts
index a0519f6c85..09ea3cb112 100644
--- a/src/app/submission/sections/upload/file/section-upload-file.component.ts
+++ b/src/app/submission/sections/upload/file/section-upload-file.component.ts
@@ -28,6 +28,7 @@ import { JsonPatchOperationsBuilder } from '../../../../core/json-patch/builder/
import { Bitstream } from '../../../../core/shared/bitstream.model';
import { WorkspaceitemSectionUploadFileObject } from '../../../../core/submission/models/workspaceitem-section-upload-file.model';
import { SubmissionJsonPatchOperationsService } from '../../../../core/submission/submission-json-patch-operations.service';
+import { BtnDisabledDirective } from '../../../../shared/btn-disabled.directive';
import {
hasValue,
isNotUndefined,
@@ -54,6 +55,7 @@ import { SubmissionSectionUploadFileViewComponent } from './view/section-upload-
AsyncPipe,
ThemedFileDownloadLinkComponent,
FileSizePipe,
+ BtnDisabledDirective,
],
standalone: true,
})
diff --git a/src/app/system-wide-alert/alert-form/system-wide-alert-form.component.html b/src/app/system-wide-alert/alert-form/system-wide-alert-form.component.html
index 770f465a4b..dc2699b6d1 100644
--- a/src/app/system-wide-alert/alert-form/system-wide-alert-form.component.html
+++ b/src/app/system-wide-alert/alert-form/system-wide-alert-form.component.html
@@ -87,8 +87,8 @@
{{ 'system-wide-alert.form.cancel' | translate }}
-
+
{{ 'system-wide-alert.form.save' | translate }}
-
\ No newline at end of file
+
diff --git a/src/app/system-wide-alert/alert-form/system-wide-alert-form.component.ts b/src/app/system-wide-alert/alert-form/system-wide-alert-form.component.ts
index b30e864fa1..ea1c0a55f0 100644
--- a/src/app/system-wide-alert/alert-form/system-wide-alert-form.component.ts
+++ b/src/app/system-wide-alert/alert-form/system-wide-alert-form.component.ts
@@ -43,6 +43,7 @@ import { RemoteData } from '../../core/data/remote-data';
import { RequestService } from '../../core/data/request.service';
import { SystemWideAlertDataService } from '../../core/data/system-wide-alert-data.service';
import { getFirstCompletedRemoteData } from '../../core/shared/operators';
+import { BtnDisabledDirective } from '../../shared/btn-disabled.directive';
import {
hasValue,
isNotEmpty,
@@ -59,7 +60,7 @@ import { SystemWideAlert } from '../system-wide-alert.model';
styleUrls: ['./system-wide-alert-form.component.scss'],
templateUrl: './system-wide-alert-form.component.html',
standalone: true,
- imports: [FormsModule, ReactiveFormsModule, UiSwitchModule, NgIf, NgbDatepickerModule, NgbTimepickerModule, AsyncPipe, TranslateModule],
+ imports: [FormsModule, ReactiveFormsModule, UiSwitchModule, NgIf, NgbDatepickerModule, NgbTimepickerModule, AsyncPipe, TranslateModule, BtnDisabledDirective],
})
export class SystemWideAlertFormComponent implements OnInit {
diff --git a/src/app/workflowitems-edit-page/advanced-workflow-action/advanced-workflow-action-select-reviewer/reviewers-list/reviewers-list.component.ts b/src/app/workflowitems-edit-page/advanced-workflow-action/advanced-workflow-action-select-reviewer/reviewers-list/reviewers-list.component.ts
index 5ae3a13f31..c43fabdb83 100644
--- a/src/app/workflowitems-edit-page/advanced-workflow-action/advanced-workflow-action-select-reviewer/reviewers-list/reviewers-list.component.ts
+++ b/src/app/workflowitems-edit-page/advanced-workflow-action/advanced-workflow-action-select-reviewer/reviewers-list/reviewers-list.component.ts
@@ -44,6 +44,7 @@ import { EpersonDtoModel } from '../../../../core/eperson/models/eperson-dto.mod
import { Group } from '../../../../core/eperson/models/group.model';
import { PaginationService } from '../../../../core/pagination/pagination.service';
import { getFirstSucceededRemoteDataPayload } from '../../../../core/shared/operators';
+import { BtnDisabledDirective } from '../../../../shared/btn-disabled.directive';
import { ContextHelpDirective } from '../../../../shared/context-help.directive';
import { hasValue } from '../../../../shared/empty.util';
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
@@ -76,6 +77,7 @@ enum SubKey {
RouterLink,
NgClass,
NgForOf,
+ BtnDisabledDirective,
],
})
export class ReviewersListComponent extends MembersListComponent implements OnInit, OnChanges, OnDestroy {
diff --git a/src/styles/_global-styles.scss b/src/styles/_global-styles.scss
index 99cc075dbe..058a94138d 100644
--- a/src/styles/_global-styles.scss
+++ b/src/styles/_global-styles.scss
@@ -481,6 +481,17 @@ ngb-accordion {
color: darken($danger, 22%);
}
+// An element that is disabled should not have focus styles to avoid confusion
+// It however is still focusable for screen readers and keyboard navigation
+.disabled {
+ pointer-events: none;
+}
+
+.disabled:focus {
+ outline: none;
+ box-shadow: none;
+}
+
// Margin utility classes based on DSpace content spacing
.mt-cs { margin-top: var(--ds-content-spacing); }
.mb-cs { margin-bottom: var(--ds-content-spacing); }
diff --git a/src/themes/custom/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts b/src/themes/custom/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts
index a7437c0408..f74a73a4b8 100644
--- a/src/themes/custom/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts
+++ b/src/themes/custom/app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.ts
@@ -13,6 +13,7 @@ import { DsoEditMetadataValueComponent } from '../../../../../app/dso-shared/dso
import { DsoEditMetadataValueHeadersComponent } from '../../../../../app/dso-shared/dso-edit-metadata/dso-edit-metadata-value-headers/dso-edit-metadata-value-headers.component';
import { MetadataFieldSelectorComponent } from '../../../../../app/dso-shared/dso-edit-metadata/metadata-field-selector/metadata-field-selector.component';
import { AlertComponent } from '../../../../../app/shared/alert/alert.component';
+import { BtnDisabledDirective } from '../../../../../app/shared/btn-disabled.directive';
import { ThemedLoadingComponent } from '../../../../../app/shared/loading/themed-loading.component';
@Component({
@@ -22,7 +23,7 @@ import { ThemedLoadingComponent } from '../../../../../app/shared/loading/themed
// templateUrl: './dso-edit-metadata.component.html',
templateUrl: '../../../../../app/dso-shared/dso-edit-metadata/dso-edit-metadata.component.html',
standalone: true,
- imports: [NgIf, DsoEditMetadataHeadersComponent, MetadataFieldSelectorComponent, DsoEditMetadataValueHeadersComponent, DsoEditMetadataValueComponent, NgFor, DsoEditMetadataFieldValuesComponent, AlertComponent, ThemedLoadingComponent, AsyncPipe, TranslateModule],
+ imports: [NgIf, DsoEditMetadataHeadersComponent, MetadataFieldSelectorComponent, DsoEditMetadataValueHeadersComponent, DsoEditMetadataValueComponent, NgFor, DsoEditMetadataFieldValuesComponent, AlertComponent, ThemedLoadingComponent, AsyncPipe, TranslateModule, BtnDisabledDirective],
})
export class DsoEditMetadataComponent extends BaseComponent {
}
diff --git a/src/themes/custom/app/forgot-password/forgot-password-form/forgot-password-form.component.ts b/src/themes/custom/app/forgot-password/forgot-password-form/forgot-password-form.component.ts
index 9656e7b85c..37fb383429 100644
--- a/src/themes/custom/app/forgot-password/forgot-password-form/forgot-password-form.component.ts
+++ b/src/themes/custom/app/forgot-password/forgot-password-form/forgot-password-form.component.ts
@@ -7,6 +7,7 @@ import { TranslateModule } from '@ngx-translate/core';
import { ForgotPasswordFormComponent as BaseComponent } from '../../../../../app/forgot-password/forgot-password-form/forgot-password-form.component';
import { ProfilePageSecurityFormComponent } from '../../../../../app/profile-page/profile-page-security-form/profile-page-security-form.component';
+import { BtnDisabledDirective } from '../../../../../app/shared/btn-disabled.directive';
import { BrowserOnlyPipe } from '../../../../../app/shared/utils/browser-only.pipe';
@Component({
@@ -22,6 +23,7 @@ import { BrowserOnlyPipe } from '../../../../../app/shared/utils/browser-only.pi
ProfilePageSecurityFormComponent,
AsyncPipe,
NgIf,
+ BtnDisabledDirective,
],
})
/**
diff --git a/src/themes/custom/app/info/end-user-agreement/end-user-agreement.component.ts b/src/themes/custom/app/info/end-user-agreement/end-user-agreement.component.ts
index 05f2252216..2b78006f65 100644
--- a/src/themes/custom/app/info/end-user-agreement/end-user-agreement.component.ts
+++ b/src/themes/custom/app/info/end-user-agreement/end-user-agreement.component.ts
@@ -4,6 +4,7 @@ import { TranslateModule } from '@ngx-translate/core';
import { EndUserAgreementComponent as BaseComponent } from '../../../../../app/info/end-user-agreement/end-user-agreement.component';
import { EndUserAgreementContentComponent } from '../../../../../app/info/end-user-agreement/end-user-agreement-content/end-user-agreement-content.component';
+import { BtnDisabledDirective } from '../../../../../app/shared/btn-disabled.directive';
@Component({
selector: 'ds-themed-end-user-agreement',
@@ -12,7 +13,7 @@ import { EndUserAgreementContentComponent } from '../../../../../app/info/end-us
// templateUrl: './end-user-agreement.component.html'
templateUrl: '../../../../../app/info/end-user-agreement/end-user-agreement.component.html',
standalone: true,
- imports: [EndUserAgreementContentComponent, FormsModule, TranslateModule],
+ imports: [EndUserAgreementContentComponent, FormsModule, TranslateModule, BtnDisabledDirective],
})
/**
diff --git a/src/themes/custom/app/info/feedback/feedback-form/feedback-form.component.ts b/src/themes/custom/app/info/feedback/feedback-form/feedback-form.component.ts
index b3cd90e73e..3835667111 100644
--- a/src/themes/custom/app/info/feedback/feedback-form/feedback-form.component.ts
+++ b/src/themes/custom/app/info/feedback/feedback-form/feedback-form.component.ts
@@ -7,6 +7,7 @@ import {
import { TranslateModule } from '@ngx-translate/core';
import { FeedbackFormComponent as BaseComponent } from '../../../../../../app/info/feedback/feedback-form/feedback-form.component';
+import { BtnDisabledDirective } from '../../../../../../app/shared/btn-disabled.directive';
import { ErrorComponent } from '../../../../../../app/shared/error/error.component';
@Component({
@@ -16,7 +17,7 @@ import { ErrorComponent } from '../../../../../../app/shared/error/error.compone
// styleUrls: ['./feedback-form.component.scss'],
styleUrls: ['../../../../../../app/info/feedback/feedback-form/feedback-form.component.scss'],
standalone: true,
- imports: [FormsModule, ReactiveFormsModule, NgIf, ErrorComponent, TranslateModule],
+ imports: [FormsModule, ReactiveFormsModule, NgIf, ErrorComponent, TranslateModule, BtnDisabledDirective],
})
export class FeedbackFormComponent extends BaseComponent {
}
diff --git a/src/themes/custom/app/item-page/media-viewer/media-viewer-video/media-viewer-video.component.ts b/src/themes/custom/app/item-page/media-viewer/media-viewer-video/media-viewer-video.component.ts
index 5c6c7f3507..0efa013064 100644
--- a/src/themes/custom/app/item-page/media-viewer/media-viewer-video/media-viewer-video.component.ts
+++ b/src/themes/custom/app/item-page/media-viewer/media-viewer-video/media-viewer-video.component.ts
@@ -7,6 +7,7 @@ import { NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap';
import { TranslateModule } from '@ngx-translate/core';
import { MediaViewerVideoComponent as BaseComponent } from '../../../../../../app/item-page/media-viewer/media-viewer-video/media-viewer-video.component';
+import { BtnDisabledDirective } from '../../../../../../app/shared/btn-disabled.directive';
@Component({
selector: 'ds-themed-media-viewer-video',
@@ -20,6 +21,7 @@ import { MediaViewerVideoComponent as BaseComponent } from '../../../../../../ap
NgbDropdownModule,
TranslateModule,
NgIf,
+ BtnDisabledDirective,
],
})
export class MediaViewerVideoComponent extends BaseComponent {
diff --git a/src/themes/custom/app/register-email-form/register-email-form.component.ts b/src/themes/custom/app/register-email-form/register-email-form.component.ts
index 44426c527f..d1f4a6d3ff 100644
--- a/src/themes/custom/app/register-email-form/register-email-form.component.ts
+++ b/src/themes/custom/app/register-email-form/register-email-form.component.ts
@@ -12,13 +12,14 @@ import { AlertComponent } from 'src/app/shared/alert/alert.component';
import { GoogleRecaptchaComponent } from 'src/app/shared/google-recaptcha/google-recaptcha.component';
import { RegisterEmailFormComponent as BaseComponent } from '../../../../app/register-email-form/register-email-form.component';
+import { BtnDisabledDirective } from '../../../../app/shared/btn-disabled.directive';
@Component({
selector: 'ds-themed-register-email-form',
// templateUrl: './register-email-form.component.html',
templateUrl: '../../../../app/register-email-form/register-email-form.component.html',
standalone: true,
- imports: [NgIf, FormsModule, ReactiveFormsModule, AlertComponent, GoogleRecaptchaComponent, AsyncPipe, TranslateModule],
+ imports: [NgIf, FormsModule, ReactiveFormsModule, AlertComponent, GoogleRecaptchaComponent, AsyncPipe, TranslateModule, BtnDisabledDirective],
})
export class RegisterEmailFormComponent extends BaseComponent {
}
diff --git a/src/themes/custom/app/register-page/create-profile/create-profile.component.ts b/src/themes/custom/app/register-page/create-profile/create-profile.component.ts
index ac2491cc4e..7c1ff908c3 100644
--- a/src/themes/custom/app/register-page/create-profile/create-profile.component.ts
+++ b/src/themes/custom/app/register-page/create-profile/create-profile.component.ts
@@ -9,6 +9,7 @@ import { TranslateModule } from '@ngx-translate/core';
import { ProfilePageSecurityFormComponent } from '../../../../../app/profile-page/profile-page-security-form/profile-page-security-form.component';
import { CreateProfileComponent as BaseComponent } from '../../../../../app/register-page/create-profile/create-profile.component';
+import { BtnDisabledDirective } from '../../../../../app/shared/btn-disabled.directive';
/**
* Component that renders the create profile page to be used by a user registering through a token
@@ -27,6 +28,7 @@ import { CreateProfileComponent as BaseComponent } from '../../../../../app/regi
AsyncPipe,
ReactiveFormsModule,
NgForOf,
+ BtnDisabledDirective,
],
})
export class CreateProfileComponent extends BaseComponent {
diff --git a/src/themes/custom/app/request-copy/email-request-copy/email-request-copy.component.ts b/src/themes/custom/app/request-copy/email-request-copy/email-request-copy.component.ts
index 1876b134a2..cf4981d289 100644
--- a/src/themes/custom/app/request-copy/email-request-copy/email-request-copy.component.ts
+++ b/src/themes/custom/app/request-copy/email-request-copy/email-request-copy.component.ts
@@ -7,6 +7,8 @@ import { FormsModule } from '@angular/forms';
import { TranslateModule } from '@ngx-translate/core';
import { EmailRequestCopyComponent as BaseComponent } from 'src/app/request-copy/email-request-copy/email-request-copy.component';
+import { BtnDisabledDirective } from '../../../../../app/shared/btn-disabled.directive';
+
@Component({
selector: 'ds-themed-email-request-copy',
// styleUrls: ['./email-request-copy.component.scss'],
@@ -14,7 +16,7 @@ import { EmailRequestCopyComponent as BaseComponent } from 'src/app/request-copy
// templateUrl: './email-request-copy.component.html',
templateUrl: './../../../../../app/request-copy/email-request-copy/email-request-copy.component.html',
standalone: true,
- imports: [FormsModule, NgClass, NgIf, TranslateModule],
+ imports: [FormsModule, NgClass, NgIf, TranslateModule, BtnDisabledDirective],
})
export class EmailRequestCopyComponent
extends BaseComponent {
diff --git a/src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component.ts b/src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component.ts
index 424adb7942..aec7bfd6db 100644
--- a/src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component.ts
+++ b/src/themes/custom/app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component.ts
@@ -5,6 +5,7 @@ import {
import { Component } from '@angular/core';
import { TranslateModule } from '@ngx-translate/core';
+import { BtnDisabledDirective } from '../../../../../../../../../../app/shared/btn-disabled.directive';
import { ExternalSourceEntryImportModalComponent as BaseComponent } from '../../../../../../../../../../app/shared/form/builder/ds-dynamic-form-ui/relation-lookup-modal/external-source-tab/external-source-entry-import-modal/external-source-entry-import-modal.component';
import { ThemedSearchResultsComponent } from '../../../../../../../../../../app/shared/search/search-results/themed-search-results.component';
@@ -19,6 +20,7 @@ import { ThemedSearchResultsComponent } from '../../../../../../../../../../app/
ThemedSearchResultsComponent,
NgIf,
AsyncPipe,
+ BtnDisabledDirective,
],
})
export class ExternalSourceEntryImportModalComponent extends BaseComponent {
diff --git a/src/themes/custom/app/submission/sections/upload/file/section-upload-file.component.ts b/src/themes/custom/app/submission/sections/upload/file/section-upload-file.component.ts
index 13f5f97650..cea515102a 100644
--- a/src/themes/custom/app/submission/sections/upload/file/section-upload-file.component.ts
+++ b/src/themes/custom/app/submission/sections/upload/file/section-upload-file.component.ts
@@ -6,6 +6,7 @@ import { Component } from '@angular/core';
import { TranslateModule } from '@ngx-translate/core';
import { SubmissionSectionUploadFileComponent as BaseComponent } from 'src/app/submission/sections/upload/file/section-upload-file.component';
+import { BtnDisabledDirective } from '../../../../../../../app/shared/btn-disabled.directive';
import { ThemedFileDownloadLinkComponent } from '../../../../../../../app/shared/file-download-link/themed-file-download-link.component';
import { FileSizePipe } from '../../../../../../../app/shared/utils/file-size-pipe';
import { SubmissionSectionUploadFileViewComponent } from '../../../../../../../app/submission/sections/upload/file/view/section-upload-file-view.component';
@@ -27,6 +28,7 @@ import { SubmissionSectionUploadFileViewComponent } from '../../../../../../../a
AsyncPipe,
ThemedFileDownloadLinkComponent,
FileSizePipe,
+ BtnDisabledDirective,
],
})
export class SubmissionSectionUploadFileComponent