Skip to content

Commit 43745d8

Browse files
author
Jens Vannerum
committed
117544: replace all disabled states with our dsDisabled directive
1 parent 63c7664 commit 43745d8

75 files changed

Lines changed: 162 additions & 160 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/app/access-control/bulk-access/bulk-access.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<button class="btn btn-outline-primary mr-3" (click)="reset()">
1010
{{ 'access-control-cancel' | translate }}
1111
</button>
12-
<button class="btn btn-primary" [disabled]="!canExport()" (click)="submit()">
12+
<button class="btn btn-primary" [dsDisabled]="!canExport()" (click)="submit()">
1313
{{ 'access-control-execute' | translate }}
1414
</button>
1515
</div>

src/app/access-control/epeople-registry/epeople-registry.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ <h3 id="search" class="border-bottom pb-2">{{labelPrefix + 'search.head' | trans
7777
title="{{labelPrefix + 'table.edit.buttons.edit' | translate: { name: dsoNameService.getName(epersonDto.eperson) } }}">
7878
<i class="fas fa-edit fa-fw"></i>
7979
</button>
80-
<button [disabled]="!epersonDto.ableToDelete" (click)="deleteEPerson(epersonDto.eperson)"
80+
<button [dsDisabled]="!epersonDto.ableToDelete" (click)="deleteEPerson(epersonDto.eperson)"
8181
class="delete-button btn btn-outline-danger btn-sm access-control-deleteEPersonButton"
8282
title="{{labelPrefix + 'table.edit.buttons.remove' | translate: { name: dsoNameService.getName(epersonDto.eperson) } }}">
8383
<i class="fas fa-trash-alt fa-fw"></i>

src/app/access-control/epeople-registry/eperson-form/eperson-form.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ <h4>{{messagePrefix + '.edit' | translate}}</h4>
2020
class="btn btn-outline-secondary"><i class="fas fa-arrow-left"></i> {{messagePrefix + '.return' | translate}}</button>
2121
</div>
2222
<div *ngIf="displayResetPassword" between class="btn-group">
23-
<button class="btn btn-primary" [disabled]="!(canReset$ | async)" (click)="resetPassword()">
23+
<button class="btn btn-primary" [dsDisabled]="!(canReset$ | async)" (click)="resetPassword()">
2424
<i class="fa fa-key"></i> {{'admin.access-control.epeople.actions.reset' | translate}}
2525
</button>
2626
</div>
@@ -32,7 +32,7 @@ <h4>{{messagePrefix + '.edit' | translate}}</h4>
3232
<i class="fa fa-user-secret"></i> {{'admin.access-control.epeople.actions.stop-impersonating' | translate}}
3333
</button>
3434
</div>
35-
<button after class="btn btn-danger delete-button" [disabled]="!(canDelete$ | async)" (click)="delete()">
35+
<button after class="btn btn-danger delete-button" [dsDisabled]="!(canDelete$ | async)" (click)="delete()">
3636
<i class="fas fa-trash"></i> {{'admin.access-control.epeople.actions.delete' | translate}}
3737
</button>
3838
</ds-form>

src/app/access-control/group-registry/group-form/group-form.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ <h2 class="border-bottom pb-2">
4040
class="btn btn-outline-secondary"><i class="fas fa-arrow-left"></i> {{messagePrefix + '.return' | translate}}</button>
4141
</div>
4242
<div after *ngIf="groupBeingEdited != null" class="btn-group">
43-
<button class="btn btn-danger delete-button" [disabled]="!(canEdit$ | async) || groupBeingEdited.permanent"
43+
<button class="btn btn-danger delete-button" [dsDisabled]="!(canEdit$ | async) || groupBeingEdited.permanent"
4444
(click)="delete()">
4545
<i class="fa fa-trash"></i> {{ messagePrefix + '.actions.delete' | translate}}
4646
</button>

src/app/access-control/group-registry/group-form/members-list/members-list.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,15 @@ <h4 id="search" class="border-bottom pb-2">
7171
<div class="btn-group edit-field">
7272
<button *ngIf="ePerson.memberOfGroup"
7373
(click)="deleteMemberFromGroup(ePerson)"
74-
[disabled]="actionConfig.remove.disabled"
74+
[dsDisabled]="actionConfig.remove.disabled"
7575
[ngClass]="['btn btn-sm', actionConfig.remove.css]"
7676
title="{{messagePrefix + '.table.edit.buttons.remove' | translate: { name: dsoNameService.getName(ePerson.eperson) } }}">
7777
<i [ngClass]="actionConfig.remove.icon"></i>
7878
</button>
7979

8080
<button *ngIf="!ePerson.memberOfGroup"
8181
(click)="addMemberToGroup(ePerson)"
82-
[disabled]="actionConfig.add.disabled"
82+
[dsDisabled]="actionConfig.add.disabled"
8383
[ngClass]="['btn btn-sm', actionConfig.add.css]"
8484
title="{{messagePrefix + '.table.edit.buttons.add' | translate: { name: dsoNameService.getName(ePerson.eperson) } }}">
8585
<i [ngClass]="actionConfig.add.icon"></i>
@@ -135,14 +135,14 @@ <h4>{{messagePrefix + '.headMembers' | translate}}</h4>
135135
<div class="btn-group edit-field">
136136
<button *ngIf="ePerson.memberOfGroup"
137137
(click)="deleteMemberFromGroup(ePerson)"
138-
[disabled]="actionConfig.remove.disabled"
138+
[dsDisabled]="actionConfig.remove.disabled"
139139
[ngClass]="['btn btn-sm', actionConfig.remove.css]"
140140
title="{{messagePrefix + '.table.edit.buttons.remove' | translate: { name: dsoNameService.getName(ePerson.eperson) } }}">
141141
<i [ngClass]="actionConfig.remove.icon"></i>
142142
</button>
143143
<button *ngIf="!ePerson.memberOfGroup"
144144
(click)="addMemberToGroup(ePerson)"
145-
[disabled]="actionConfig.add.disabled"
145+
[dsDisabled]="actionConfig.add.disabled"
146146
[ngClass]="['btn btn-sm', actionConfig.add.css]"
147147
title="{{messagePrefix + '.table.edit.buttons.add' | translate: { name: dsoNameService.getName(ePerson.eperson) } }}">
148148
<i [ngClass]="actionConfig.add.icon"></i>

src/app/access-control/group-registry/groups-registry.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ <h3 id="search" class="border-bottom pb-2">{{messagePrefix + 'search.head' | tra
7070
<i class="fas fa-edit fa-fw"></i>
7171
</button>
7272
<button *ngSwitchCase="false"
73-
[disabled]="true"
73+
[dsDisabled]="true"
7474
class="btn btn-outline-primary btn-sm btn-edit"
7575
placement="left"
7676
[ngbTooltip]="'admin.access-control.epeople.table.edit.buttons.edit-disabled' | translate"

src/app/collection-page/delete-collection-page/delete-collection-page.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ <h2 id="header" class="border-bottom pb-2">{{ 'collection.delete.head' | transla
66
<p class="pb-2">{{ 'collection.delete.text' | translate:{ dso: dsoNameService.getName(dso) } }}</p>
77
<div class="form-group row">
88
<div class="col text-right space-children-mr">
9-
<button class="btn btn-outline-secondary" (click)="onCancel(dso)" [disabled]="(processing$ | async)">
9+
<button class="btn btn-outline-secondary" (click)="onCancel(dso)" [dsDisabled]="(processing$ | async)">
1010
<i class="fas fa-times"></i> {{'collection.delete.cancel' | translate}}
1111
</button>
12-
<button class="btn btn-danger" (click)="onConfirm(dso)" [disabled]="(processing$ | async)">
12+
<button class="btn btn-danger" (click)="onConfirm(dso)" [dsDisabled]="(processing$ | async)">
1313
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'collection.delete.processing' | translate}}</span>
1414
<span *ngIf="!(processing$ | async)"><i class="fas fa-trash"></i> {{'collection.delete.confirm' | translate}}</span>
1515
</button>

src/app/collection-page/edit-collection-page/collection-source/collection-source-controls/collection-source-controls.component.html

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,32 +19,32 @@ <h4>{{ 'collection.source.controls.head' | translate }}</h4>
1919
</div>
2020

2121
<button *ngIf="!(testConfigRunning$ |async)" class="btn btn-secondary"
22-
[disabled]="!(isEnabled)"
22+
[dsDisabled]="!(isEnabled)"
2323
(click)="testConfiguration(contentSource)">
2424
<span>{{'collection.source.controls.test.submit' | translate}}</span>
2525
</button>
2626
<button *ngIf="(testConfigRunning$ |async)" class="btn btn-secondary"
27-
[disabled]="true">
27+
[dsDisabled]="true">
2828
<span class="spinner-border spinner-border-sm spinner-button" role="status" aria-hidden="true"></span>
2929
<span>{{'collection.source.controls.test.running' | translate}}</span>
3030
</button>
3131
<button *ngIf="!(importRunning$ |async)" class="btn btn-primary"
32-
[disabled]="!(isEnabled)"
32+
[dsDisabled]="!(isEnabled)"
3333
(click)="importNow()">
3434
<span class="d-none d-sm-inline">{{'collection.source.controls.import.submit' | translate}}</span>
3535
</button>
3636
<button *ngIf="(importRunning$ |async)" class="btn btn-primary"
37-
[disabled]="true">
37+
[dsDisabled]="true">
3838
<span class="spinner-border spinner-border-sm spinner-button" role="status" aria-hidden="true"></span>
3939
<span class="d-none d-sm-inline">{{'collection.source.controls.import.running' | translate}}</span>
4040
</button>
4141
<button *ngIf="!(reImportRunning$ |async)" class="btn btn-primary"
42-
[disabled]="!(isEnabled)"
42+
[dsDisabled]="!(isEnabled)"
4343
(click)="resetAndReimport()">
4444
<span class="d-none d-sm-inline">&nbsp;{{'collection.source.controls.reset.submit' | translate}}</span>
4545
</button>
4646
<button *ngIf="(reImportRunning$ |async)" class="btn btn-primary"
47-
[disabled]="true">
47+
[dsDisabled]="true">
4848
<span class="spinner-border spinner-border-sm spinner-button" role="status" aria-hidden="true"></span>
4949
<span class="d-none d-sm-inline">&nbsp;{{'collection.source.controls.reset.running' | translate}}</span>
5050
</button>

src/app/collection-page/edit-collection-page/collection-source/collection-source.component.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="container-fluid">
22
<div class="d-inline-block float-right space-children-mr">
33
<button class=" btn btn-danger" *ngIf="!(isReinstatable() | async)"
4-
[disabled]="!(hasChanges() | async)"
4+
[dsDisabled]="!(hasChanges() | async)"
55
(click)="discard()"><i
66
class="fas fa-times"></i>
77
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.discard-button" | translate}}</span>
@@ -12,7 +12,7 @@
1212
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.reinstate-button" | translate}}</span>
1313
</button>
1414
<button class="btn btn-primary"
15-
[disabled]="!(hasChanges() | async) || !isValid() || (initialHarvestType === harvestTypeNone && contentSource.harvestType === initialHarvestType)"
15+
[dsDisabled]="!(hasChanges() | async) || !isValid() || (initialHarvestType === harvestTypeNone && contentSource.harvestType === initialHarvestType)"
1616
(click)="onSubmit()"><i
1717
class="fas fa-save"></i>
1818
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.save-button" | translate}}</span>
@@ -45,7 +45,7 @@ <h4 *ngIf="contentSource && (contentSource?.harvestType !== harvestTypeNone)">{{
4545
<div class="col-12">
4646
<div class="d-inline-block float-right ml-1 space-children-mr">
4747
<button class=" btn btn-danger" *ngIf="!(isReinstatable() | async)"
48-
[disabled]="!(hasChanges() | async)"
48+
[dsDisabled]="!(hasChanges() | async)"
4949
(click)="discard()"><i
5050
class="fas fa-times"></i>
5151
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.discard-button" | translate}}</span>
@@ -56,7 +56,7 @@ <h4 *ngIf="contentSource && (contentSource?.harvestType !== harvestTypeNone)">{{
5656
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.reinstate-button" | translate}}</span>
5757
</button>
5858
<button class="btn btn-primary"
59-
[disabled]="!(hasChanges() | async) || !isValid() || (initialHarvestType === harvestTypeNone && contentSource.harvestType === initialHarvestType)"
59+
[dsDisabled]="!(hasChanges() | async) || !isValid() || (initialHarvestType === harvestTypeNone && contentSource.harvestType === initialHarvestType)"
6060
(click)="onSubmit()"><i
6161
class="fas fa-save"></i>
6262
<span class="d-none d-sm-inline">&nbsp;{{"item.edit.metadata.save-button" | translate}}</span>

src/app/community-page/delete-community-page/delete-community-page.component.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ <h2 id="header" class="border-bottom pb-2">{{ 'community.delete.head' | translat
66
<p class="pb-2">{{ 'community.delete.text' | translate:{ dso: dsoNameService.getName(dso) } }}</p>
77
<div class="form-group row">
88
<div class="col text-right space-children-mr">
9-
<button class="btn btn-outline-secondary" (click)="onCancel(dso)" [disabled]="(processing$ | async)">
9+
<button class="btn btn-outline-secondary" (click)="onCancel(dso)" [dsDisabled]="(processing$ | async)">
1010
<i class="fas fa-times"></i> {{'community.delete.cancel' | translate}}
1111
</button>
12-
<button class="btn btn-danger" (click)="onConfirm(dso)" [disabled]="(processing$ | async)">
12+
<button class="btn btn-danger" (click)="onConfirm(dso)" [dsDisabled]="(processing$ | async)">
1313
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'community.delete.processing' | translate}}</span>
1414
<span *ngIf="!(processing$ | async)"><i class="fas fa-trash"></i> {{'community.delete.confirm' | translate}}</span>
1515
</button>

0 commit comments

Comments
 (0)