Skip to content

Commit aec970f

Browse files
author
Jens Vannerum
committed
117544: rename directive to be clear it should currently only be used for buttons
1 parent e7d050d commit aec970f

File tree

181 files changed

+365
-365
lines changed

Some content is hidden

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

181 files changed

+365
-365
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ <h1>{{ 'admin.access-control.bulk-access.title' | translate }}</h1>
1010
<button class="btn btn-outline-primary mr-3" (click)="reset()">
1111
{{ 'access-control-cancel' | translate }}
1212
</button>
13-
<button class="btn btn-primary" [dsDisabled]="!canExport()" (click)="submit()">
13+
<button class="btn btn-primary" [dsBtnDisabled]="!canExport()" (click)="submit()">
1414
{{ 'access-control-execute' | translate }}
1515
</button>
1616
</div>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
} from 'rxjs/operators';
1515

1616
import { BulkAccessControlService } from '../../shared/access-control-form-container/bulk-access-control.service';
17-
import { DisabledDirective } from '../../shared/disabled-directive';
17+
import { BtnDisabledDirective } from '../../shared/btn-disabled.directive';
1818
import { SelectableListState } from '../../shared/object-list/selectable-list/selectable-list.reducer';
1919
import { SelectableListService } from '../../shared/object-list/selectable-list/selectable-list.service';
2020
import { BulkAccessBrowseComponent } from './browse/bulk-access-browse.component';
@@ -28,7 +28,7 @@ import { BulkAccessSettingsComponent } from './settings/bulk-access-settings.com
2828
TranslateModule,
2929
BulkAccessSettingsComponent,
3030
BulkAccessBrowseComponent,
31-
DisabledDirective,
31+
BtnDisabledDirective,
3232
],
3333
standalone: true,
3434
})

src/app/access-control/epeople-registry/epeople-registry.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ import { EPersonDataService } from '../../core/eperson/eperson-data.service';
4242
import { EPerson } from '../../core/eperson/models/eperson.model';
4343
import { PaginationService } from '../../core/pagination/pagination.service';
4444
import { PageInfo } from '../../core/shared/page-info.model';
45-
import { DisabledDirective } from '../../shared/disabled-directive';
45+
import { BtnDisabledDirective } from '../../shared/btn-disabled.directive';
4646
import { FormBuilderService } from '../../shared/form/builder/form-builder.service';
4747
import { ThemedLoadingComponent } from '../../shared/loading/themed-loading.component';
4848
import { getMockFormBuilderService } from '../../shared/mocks/form-builder-service.mock';
@@ -152,7 +152,7 @@ describe('EPeopleRegistryComponent', () => {
152152
paginationService = new PaginationServiceStub();
153153
TestBed.configureTestingModule({
154154
imports: [CommonModule, NgbModule, FormsModule, ReactiveFormsModule, BrowserModule, RouterTestingModule.withRoutes([]),
155-
TranslateModule.forRoot(), EPeopleRegistryComponent, DisabledDirective],
155+
TranslateModule.forRoot(), EPeopleRegistryComponent, BtnDisabledDirective],
156156
providers: [
157157
{ provide: EPersonDataService, useValue: ePersonDataServiceStub },
158158
{ provide: NotificationsService, useValue: new NotificationsServiceStub() },

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h1 class="border-bottom pb-2">{{messagePrefix + '.edit' | translate}}</h1>
2525
</button>
2626
</div>
2727
<div *ngIf="displayResetPassword" between class="btn-group">
28-
<button class="btn btn-primary" [dsDisabled]="(canReset$ | async) !== true" type="button" (click)="resetPassword()">
28+
<button class="btn btn-primary" [dsBtnDisabled]="(canReset$ | async) !== true" type="button" (click)="resetPassword()">
2929
<i class="fa fa-key"></i> {{'admin.access-control.epeople.actions.reset' | translate}}
3030
</button>
3131
</div>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ import { GroupDataService } from '../../../core/eperson/group-data.service';
4545
import { EPerson } from '../../../core/eperson/models/eperson.model';
4646
import { PaginationService } from '../../../core/pagination/pagination.service';
4747
import { PageInfo } from '../../../core/shared/page-info.model';
48-
import { DisabledDirective } from '../../../shared/disabled-directive';
48+
import { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
4949
import { FormBuilderService } from '../../../shared/form/builder/form-builder.service';
5050
import { FormComponent } from '../../../shared/form/form.component';
5151
import { ThemedLoadingComponent } from '../../../shared/loading/themed-loading.component';
@@ -228,7 +228,7 @@ describe('EPersonFormComponent', () => {
228228
route = new ActivatedRouteStub();
229229
router = new RouterStub();
230230
TestBed.configureTestingModule({
231-
imports: [CommonModule, NgbModule, FormsModule, ReactiveFormsModule, DisabledDirective, BrowserModule,
231+
imports: [CommonModule, NgbModule, FormsModule, ReactiveFormsModule, BtnDisabledDirective, BrowserModule,
232232
TranslateModule.forRoot({
233233
loader: {
234234
provide: TranslateLoader,

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ import { PageInfo } from '../../../core/shared/page-info.model';
6666
import { Registration } from '../../../core/shared/registration.model';
6767
import { TYPE_REQUEST_FORGOT } from '../../../register-email-form/register-email-form.component';
6868
import { ConfirmationModalComponent } from '../../../shared/confirmation-modal/confirmation-modal.component';
69-
import { DisabledDirective } from '../../../shared/disabled-directive';
69+
import { BtnDisabledDirective } from '../../../shared/btn-disabled.directive';
7070
import { hasValue } from '../../../shared/empty.util';
7171
import { FormBuilderService } from '../../../shared/form/builder/form-builder.service';
7272
import { FormComponent } from '../../../shared/form/form.component';
@@ -93,7 +93,7 @@ import { ValidateEmailNotTaken } from './validators/email-taken.validator';
9393
PaginationComponent,
9494
RouterLink,
9595
HasNoValuePipe,
96-
DisabledDirective,
96+
BtnDisabledDirective,
9797
],
9898
standalone: true,
9999
})

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,14 @@ <h3>{{messagePrefix + '.headMembers' | translate}}</h3>
3535
<div class="btn-group edit-field">
3636
<button (click)="deleteMemberFromGroup(epersonDTO.eperson)"
3737
*ngIf="epersonDTO.ableToDelete"
38-
[dsDisabled]="actionConfig.remove.disabled"
38+
[dsBtnDisabled]="actionConfig.remove.disabled"
3939
[ngClass]="['btn btn-sm', actionConfig.remove.css]"
4040
title="{{messagePrefix + '.table.edit.buttons.remove' | translate: { name: dsoNameService.getName(epersonDTO.eperson) } }}">
4141
<i [ngClass]="actionConfig.remove.icon"></i>
4242
</button>
4343
<button *ngIf="!epersonDTO.ableToDelete"
4444
(click)="addMemberToGroup(epersonDTO.eperson)"
45-
[dsDisabled]="actionConfig.add.disabled"
45+
[dsBtnDisabled]="actionConfig.add.disabled"
4646
[ngClass]="['btn btn-sm', actionConfig.add.css]"
4747
title="{{messagePrefix + '.table.edit.buttons.add' | translate: { name: dsoNameService.getName(epersonDTO.eperson) } }}">
4848
<i [ngClass]="actionConfig.add.icon"></i>
@@ -122,7 +122,7 @@ <h3 id="search" class="border-bottom pb-2">
122122
<td class="align-middle">
123123
<div class="btn-group edit-field">
124124
<button (click)="addMemberToGroup(eperson)"
125-
[dsDisabled]="actionConfig.add.disabled"
125+
[dsBtnDisabled]="actionConfig.add.disabled"
126126
[ngClass]="['btn btn-sm', actionConfig.add.css]"
127127
title="{{messagePrefix + '.table.edit.buttons.add' | translate: { name: dsoNameService.getName(eperson) } }}">
128128
<i [ngClass]="actionConfig.add.icon"></i>

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ import {
5555
getRemoteDataPayload,
5656
} from '../../../../core/shared/operators';
5757
import { ContextHelpDirective } from '../../../../shared/context-help.directive';
58-
import { DisabledDirective } from '../../../../shared/disabled-directive';
58+
import { BtnDisabledDirective } from '../../../../shared/btn-disabled.directive';
5959
import { NotificationsService } from '../../../../shared/notifications/notifications.service';
6060
import { PaginationComponent } from '../../../../shared/pagination/pagination.component';
6161
import { PaginationComponentOptions } from '../../../../shared/pagination/pagination-component-options.model';
@@ -114,7 +114,7 @@ export interface EPersonListActionConfig {
114114
RouterLink,
115115
NgClass,
116116
NgForOf,
117-
DisabledDirective,
117+
BtnDisabledDirective,
118118
],
119119
standalone: true,
120120
})

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

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

src/app/access-control/group-registry/groups-registry.component.spec.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ import { RouteService } from '../../core/services/route.service';
5050
import { DSpaceObject } from '../../core/shared/dspace-object.model';
5151
import { NoContent } from '../../core/shared/NoContent.model';
5252
import { PageInfo } from '../../core/shared/page-info.model';
53-
import { DisabledDirective } from '../../shared/disabled-directive';
53+
import { BtnDisabledDirective } from '../../shared/btn-disabled.directive';
5454
import {
5555
DSONameServiceMock,
5656
UNDEFINED_NAME,
@@ -209,7 +209,7 @@ describe('GroupsRegistryComponent', () => {
209209
imports: [CommonModule, NgbModule, FormsModule, ReactiveFormsModule, BrowserModule,
210210
TranslateModule.forRoot(),
211211
GroupsRegistryComponent,
212-
DisabledDirective,
212+
BtnDisabledDirective,
213213
],
214214
providers: [GroupsRegistryComponent,
215215
{ provide: DSONameService, useValue: new DSONameServiceMock() },

0 commit comments

Comments
 (0)