mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
117544: rename directive to be clear it should currently only be used for buttons
This commit is contained in:
@@ -10,7 +10,7 @@
|
|||||||
<button class="btn btn-outline-primary mr-3" (click)="reset()">
|
<button class="btn btn-outline-primary mr-3" (click)="reset()">
|
||||||
{{ 'access-control-cancel' | translate }}
|
{{ 'access-control-cancel' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-primary" [dsDisabled]="!canExport()" (click)="submit()">
|
<button class="btn btn-primary" [dsBtnDisabled]="!canExport()" (click)="submit()">
|
||||||
{{ 'access-control-execute' | translate }}
|
{{ 'access-control-execute' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -27,7 +27,7 @@ import { RequestService } from '../../core/data/request.service';
|
|||||||
import { PaginationService } from '../../core/pagination/pagination.service';
|
import { PaginationService } from '../../core/pagination/pagination.service';
|
||||||
import { PaginationServiceStub } from '../../shared/testing/pagination-service.stub';
|
import { PaginationServiceStub } from '../../shared/testing/pagination-service.stub';
|
||||||
import { FindListOptions } from '../../core/data/find-list-options.model';
|
import { FindListOptions } from '../../core/data/find-list-options.model';
|
||||||
import {DisabledDirective} from '../../shared/disabled-directive';
|
import {BtnDisabledDirective} from '../../shared/btn-disabled.directive';
|
||||||
|
|
||||||
describe('EPeopleRegistryComponent', () => {
|
describe('EPeopleRegistryComponent', () => {
|
||||||
let component: EPeopleRegistryComponent;
|
let component: EPeopleRegistryComponent;
|
||||||
@@ -132,7 +132,7 @@ describe('EPeopleRegistryComponent', () => {
|
|||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
declarations: [EPeopleRegistryComponent, DisabledDirective],
|
declarations: [EPeopleRegistryComponent, BtnDisabledDirective],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: EPersonDataService, useValue: ePersonDataServiceStub },
|
{ provide: EPersonDataService, useValue: ePersonDataServiceStub },
|
||||||
{ provide: NotificationsService, useValue: new NotificationsServiceStub() },
|
{ provide: NotificationsService, useValue: new NotificationsServiceStub() },
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="displayResetPassword" between class="btn-group">
|
<div *ngIf="displayResetPassword" between class="btn-group">
|
||||||
<button class="btn btn-primary" [dsDisabled]="!(canReset$ | async)" type="button" (click)="resetPassword()">
|
<button class="btn btn-primary" [dsBtnDisabled]="!(canReset$ | async)" type="button" (click)="resetPassword()">
|
||||||
<i class="fa fa-key"></i> {{'admin.access-control.epeople.actions.reset' | translate}}
|
<i class="fa fa-key"></i> {{'admin.access-control.epeople.actions.reset' | translate}}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -35,7 +35,7 @@ import { FollowLinkConfig } from '../../../shared/utils/follow-link-config.model
|
|||||||
import { ActivatedRoute, Router } from '@angular/router';
|
import { ActivatedRoute, Router } from '@angular/router';
|
||||||
import { RouterStub } from '../../../shared/testing/router.stub';
|
import { RouterStub } from '../../../shared/testing/router.stub';
|
||||||
import { ActivatedRouteStub } from '../../../shared/testing/active-router.stub';
|
import { ActivatedRouteStub } from '../../../shared/testing/active-router.stub';
|
||||||
import {DisabledDirective} from '../../../shared/disabled-directive';
|
import {BtnDisabledDirective} from '../../../shared/btn-disabled.directive';
|
||||||
|
|
||||||
describe('EPersonFormComponent', () => {
|
describe('EPersonFormComponent', () => {
|
||||||
let component: EPersonFormComponent;
|
let component: EPersonFormComponent;
|
||||||
@@ -203,7 +203,7 @@ describe('EPersonFormComponent', () => {
|
|||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
declarations: [EPersonFormComponent, DisabledDirective],
|
declarations: [EPersonFormComponent, BtnDisabledDirective],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: EPersonDataService, useValue: ePersonDataServiceStub },
|
{ provide: EPersonDataService, useValue: ePersonDataServiceStub },
|
||||||
{ provide: GroupDataService, useValue: groupsDataService },
|
{ provide: GroupDataService, useValue: groupsDataService },
|
||||||
|
@@ -34,7 +34,7 @@
|
|||||||
<td class="align-middle">
|
<td class="align-middle">
|
||||||
<div class="btn-group edit-field">
|
<div class="btn-group edit-field">
|
||||||
<button (click)="deleteMemberFromGroup(eperson)"
|
<button (click)="deleteMemberFromGroup(eperson)"
|
||||||
[dsDisabled]="actionConfig.remove.disabled"
|
[dsBtnDisabled]="actionConfig.remove.disabled"
|
||||||
[ngClass]="['btn btn-sm', actionConfig.remove.css]"
|
[ngClass]="['btn btn-sm', actionConfig.remove.css]"
|
||||||
title="{{messagePrefix + '.table.edit.buttons.remove' | translate: { name: dsoNameService.getName(eperson) } }}">
|
title="{{messagePrefix + '.table.edit.buttons.remove' | translate: { name: dsoNameService.getName(eperson) } }}">
|
||||||
<i [ngClass]="actionConfig.remove.icon"></i>
|
<i [ngClass]="actionConfig.remove.icon"></i>
|
||||||
@@ -114,7 +114,7 @@
|
|||||||
<td class="align-middle">
|
<td class="align-middle">
|
||||||
<div class="btn-group edit-field">
|
<div class="btn-group edit-field">
|
||||||
<button (click)="addMemberToGroup(eperson)"
|
<button (click)="addMemberToGroup(eperson)"
|
||||||
[dsDisabled]="actionConfig.add.disabled"
|
[dsBtnDisabled]="actionConfig.add.disabled"
|
||||||
[ngClass]="['btn btn-sm', actionConfig.add.css]"
|
[ngClass]="['btn btn-sm', actionConfig.add.css]"
|
||||||
title="{{messagePrefix + '.table.edit.buttons.add' | translate: { name: dsoNameService.getName(eperson) } }}">
|
title="{{messagePrefix + '.table.edit.buttons.add' | translate: { name: dsoNameService.getName(eperson) } }}">
|
||||||
<i [ngClass]="actionConfig.add.icon"></i>
|
<i [ngClass]="actionConfig.add.icon"></i>
|
||||||
|
@@ -69,7 +69,7 @@
|
|||||||
<i class="fas fa-edit fa-fw"></i>
|
<i class="fas fa-edit fa-fw"></i>
|
||||||
</button>
|
</button>
|
||||||
<button *ngSwitchCase="false"
|
<button *ngSwitchCase="false"
|
||||||
[dsDisabled]="true"
|
[dsBtnDisabled]="true"
|
||||||
class="btn btn-outline-primary btn-sm btn-edit"
|
class="btn btn-outline-primary btn-sm btn-edit"
|
||||||
placement="left"
|
placement="left"
|
||||||
[ngbTooltip]="'admin.access-control.epeople.table.edit.buttons.edit-disabled' | translate"
|
[ngbTooltip]="'admin.access-control.epeople.table.edit.buttons.edit-disabled' | translate"
|
||||||
|
@@ -34,7 +34,7 @@ import { FeatureID } from '../../core/data/feature-authorization/feature-id';
|
|||||||
import { NoContent } from '../../core/shared/NoContent.model';
|
import { NoContent } from '../../core/shared/NoContent.model';
|
||||||
import { DSONameService } from '../../core/breadcrumbs/dso-name.service';
|
import { DSONameService } from '../../core/breadcrumbs/dso-name.service';
|
||||||
import { DSONameServiceMock, UNDEFINED_NAME } from '../../shared/mocks/dso-name.service.mock';
|
import { DSONameServiceMock, UNDEFINED_NAME } from '../../shared/mocks/dso-name.service.mock';
|
||||||
import {DisabledDirective} from '../../shared/disabled-directive';
|
import {BtnDisabledDirective} from '../../shared/btn-disabled.directive';
|
||||||
|
|
||||||
describe('GroupsRegistryComponent', () => {
|
describe('GroupsRegistryComponent', () => {
|
||||||
let component: GroupsRegistryComponent;
|
let component: GroupsRegistryComponent;
|
||||||
@@ -172,7 +172,7 @@ describe('GroupsRegistryComponent', () => {
|
|||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
declarations: [GroupsRegistryComponent, DisabledDirective],
|
declarations: [GroupsRegistryComponent, BtnDisabledDirective],
|
||||||
providers: [GroupsRegistryComponent,
|
providers: [GroupsRegistryComponent,
|
||||||
{ provide: DSONameService, useValue: new DSONameServiceMock() },
|
{ provide: DSONameService, useValue: new DSONameServiceMock() },
|
||||||
{ provide: EPersonDataService, useValue: ePersonDataServiceStub },
|
{ provide: EPersonDataService, useValue: ePersonDataServiceStub },
|
||||||
|
@@ -6,10 +6,10 @@
|
|||||||
<p class="pb-2">{{ 'collection.delete.text' | translate:{ dso: dsoNameService.getName(dso) } }}</p>
|
<p class="pb-2">{{ 'collection.delete.text' | translate:{ dso: dsoNameService.getName(dso) } }}</p>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col text-right space-children-mr">
|
<div class="col text-right space-children-mr">
|
||||||
<button class="btn btn-outline-secondary" (click)="onCancel(dso)" [dsDisabled]="(processing$ | async)">
|
<button class="btn btn-outline-secondary" (click)="onCancel(dso)" [dsBtnDisabled]="(processing$ | async)">
|
||||||
<i class="fas fa-times"></i> {{'collection.delete.cancel' | translate}}
|
<i class="fas fa-times"></i> {{'collection.delete.cancel' | translate}}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-danger" (click)="onConfirm(dso)" [dsDisabled]="(processing$ | async)">
|
<button class="btn btn-danger" (click)="onConfirm(dso)" [dsBtnDisabled]="(processing$ | async)">
|
||||||
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'collection.delete.processing' | translate}}</span>
|
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'collection.delete.processing' | translate}}</span>
|
||||||
<span *ngIf="!(processing$ | async)"><i class="fas fa-trash"></i> {{'collection.delete.confirm' | translate}}</span>
|
<span *ngIf="!(processing$ | async)"><i class="fas fa-trash"></i> {{'collection.delete.confirm' | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
|
@@ -19,32 +19,32 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<button *ngIf="!(testConfigRunning$ |async)" class="btn btn-secondary"
|
<button *ngIf="!(testConfigRunning$ |async)" class="btn btn-secondary"
|
||||||
[dsDisabled]="!(isEnabled)"
|
[dsBtnDisabled]="!(isEnabled)"
|
||||||
(click)="testConfiguration(contentSource)">
|
(click)="testConfiguration(contentSource)">
|
||||||
<span>{{'collection.source.controls.test.submit' | translate}}</span>
|
<span>{{'collection.source.controls.test.submit' | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button *ngIf="(testConfigRunning$ |async)" class="btn btn-secondary"
|
<button *ngIf="(testConfigRunning$ |async)" class="btn btn-secondary"
|
||||||
[dsDisabled]="true">
|
[dsBtnDisabled]="true">
|
||||||
<span class="spinner-border spinner-border-sm spinner-button" role="status" aria-hidden="true"></span>
|
<span class="spinner-border spinner-border-sm spinner-button" role="status" aria-hidden="true"></span>
|
||||||
<span>{{'collection.source.controls.test.running' | translate}}</span>
|
<span>{{'collection.source.controls.test.running' | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button *ngIf="!(importRunning$ |async)" class="btn btn-primary"
|
<button *ngIf="!(importRunning$ |async)" class="btn btn-primary"
|
||||||
[dsDisabled]="!(isEnabled)"
|
[dsBtnDisabled]="!(isEnabled)"
|
||||||
(click)="importNow()">
|
(click)="importNow()">
|
||||||
<span class="d-none d-sm-inline">{{'collection.source.controls.import.submit' | translate}}</span>
|
<span class="d-none d-sm-inline">{{'collection.source.controls.import.submit' | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button *ngIf="(importRunning$ |async)" class="btn btn-primary"
|
<button *ngIf="(importRunning$ |async)" class="btn btn-primary"
|
||||||
[dsDisabled]="true">
|
[dsBtnDisabled]="true">
|
||||||
<span class="spinner-border spinner-border-sm spinner-button" role="status" aria-hidden="true"></span>
|
<span class="spinner-border spinner-border-sm spinner-button" role="status" aria-hidden="true"></span>
|
||||||
<span class="d-none d-sm-inline">{{'collection.source.controls.import.running' | translate}}</span>
|
<span class="d-none d-sm-inline">{{'collection.source.controls.import.running' | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button *ngIf="!(reImportRunning$ |async)" class="btn btn-primary"
|
<button *ngIf="!(reImportRunning$ |async)" class="btn btn-primary"
|
||||||
[dsDisabled]="!(isEnabled)"
|
[dsBtnDisabled]="!(isEnabled)"
|
||||||
(click)="resetAndReimport()">
|
(click)="resetAndReimport()">
|
||||||
<span class="d-none d-sm-inline"> {{'collection.source.controls.reset.submit' | translate}}</span>
|
<span class="d-none d-sm-inline"> {{'collection.source.controls.reset.submit' | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button *ngIf="(reImportRunning$ |async)" class="btn btn-primary"
|
<button *ngIf="(reImportRunning$ |async)" class="btn btn-primary"
|
||||||
[dsDisabled]="true">
|
[dsBtnDisabled]="true">
|
||||||
<span class="spinner-border spinner-border-sm spinner-button" role="status" aria-hidden="true"></span>
|
<span class="spinner-border spinner-border-sm spinner-button" role="status" aria-hidden="true"></span>
|
||||||
<span class="d-none d-sm-inline"> {{'collection.source.controls.reset.running' | translate}}</span>
|
<span class="d-none d-sm-inline"> {{'collection.source.controls.reset.running' | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
|
@@ -22,7 +22,7 @@ import { TestScheduler } from 'rxjs/testing';
|
|||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { VarDirective } from '../../../../shared/utils/var.directive';
|
import { VarDirective } from '../../../../shared/utils/var.directive';
|
||||||
import { ContentSourceSetSerializer } from '../../../../core/shared/content-source-set-serializer';
|
import { ContentSourceSetSerializer } from '../../../../core/shared/content-source-set-serializer';
|
||||||
import {DisabledDirective} from '../../../../shared/disabled-directive';
|
import {BtnDisabledDirective} from '../../../../shared/btn-disabled.directive';
|
||||||
|
|
||||||
describe('CollectionSourceControlsComponent', () => {
|
describe('CollectionSourceControlsComponent', () => {
|
||||||
let comp: CollectionSourceControlsComponent;
|
let comp: CollectionSourceControlsComponent;
|
||||||
@@ -101,7 +101,7 @@ describe('CollectionSourceControlsComponent', () => {
|
|||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot(), RouterTestingModule],
|
imports: [TranslateModule.forRoot(), RouterTestingModule],
|
||||||
declarations: [CollectionSourceControlsComponent, VarDirective, DisabledDirective],
|
declarations: [CollectionSourceControlsComponent, VarDirective, BtnDisabledDirective],
|
||||||
providers: [
|
providers: [
|
||||||
{provide: ScriptDataService, useValue: scriptDataService},
|
{provide: ScriptDataService, useValue: scriptDataService},
|
||||||
{provide: ProcessDataService, useValue: processDataService},
|
{provide: ProcessDataService, useValue: processDataService},
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<div class="d-inline-block float-right space-children-mr">
|
<div class="d-inline-block float-right space-children-mr">
|
||||||
<button class=" btn btn-danger" *ngIf="(isReinstatable$ | async) !== true"
|
<button class=" btn btn-danger" *ngIf="(isReinstatable$ | async) !== true"
|
||||||
[dsDisabled]="(hasChanges$ | async) !== true"
|
[dsBtnDisabled]="(hasChanges$ | async) !== true"
|
||||||
(click)="discard()"><i
|
(click)="discard()"><i
|
||||||
class="fas fa-times"></i>
|
class="fas fa-times"></i>
|
||||||
<span class="d-none d-sm-inline"> {{"item.edit.metadata.discard-button" | translate}}</span>
|
<span class="d-none d-sm-inline"> {{"item.edit.metadata.discard-button" | translate}}</span>
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
<span class="d-none d-sm-inline"> {{"item.edit.metadata.reinstate-button" | translate}}</span>
|
<span class="d-none d-sm-inline"> {{"item.edit.metadata.reinstate-button" | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-primary"
|
<button class="btn btn-primary"
|
||||||
[dsDisabled]="(hasChanges$ | async) !== true || !isValid() || (initialHarvestType === harvestTypeNone && contentSource.harvestType === initialHarvestType)"
|
[dsBtnDisabled]="(hasChanges$ | async) !== true || !isValid() || (initialHarvestType === harvestTypeNone && contentSource.harvestType === initialHarvestType)"
|
||||||
(click)="onSubmit()"><i
|
(click)="onSubmit()"><i
|
||||||
class="fas fa-save"></i>
|
class="fas fa-save"></i>
|
||||||
<span class="d-none d-sm-inline"> {{"item.edit.metadata.save-button" | translate}}</span>
|
<span class="d-none d-sm-inline"> {{"item.edit.metadata.save-button" | translate}}</span>
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="d-inline-block float-right ml-1 space-children-mr">
|
<div class="d-inline-block float-right ml-1 space-children-mr">
|
||||||
<button class=" btn btn-danger" *ngIf="(isReinstatable$ | async) !== true"
|
<button class=" btn btn-danger" *ngIf="(isReinstatable$ | async) !== true"
|
||||||
[dsDisabled]="(hasChanges$ | async) !== true"
|
[dsBtnDisabled]="(hasChanges$ | async) !== true"
|
||||||
(click)="discard()"><i
|
(click)="discard()"><i
|
||||||
class="fas fa-times"></i>
|
class="fas fa-times"></i>
|
||||||
<span class="d-none d-sm-inline"> {{"item.edit.metadata.discard-button" | translate}}</span>
|
<span class="d-none d-sm-inline"> {{"item.edit.metadata.discard-button" | translate}}</span>
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
<span class="d-none d-sm-inline"> {{"item.edit.metadata.reinstate-button" | translate}}</span>
|
<span class="d-none d-sm-inline"> {{"item.edit.metadata.reinstate-button" | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-primary"
|
<button class="btn btn-primary"
|
||||||
[dsDisabled]="(hasChanges$ | async) !== true || !isValid() || (initialHarvestType === harvestTypeNone && contentSource.harvestType === initialHarvestType)"
|
[dsBtnDisabled]="(hasChanges$ | async) !== true || !isValid() || (initialHarvestType === harvestTypeNone && contentSource.harvestType === initialHarvestType)"
|
||||||
(click)="onSubmit()"><i
|
(click)="onSubmit()"><i
|
||||||
class="fas fa-save"></i>
|
class="fas fa-save"></i>
|
||||||
<span class="d-none d-sm-inline"> {{"item.edit.metadata.save-button" | translate}}</span>
|
<span class="d-none d-sm-inline"> {{"item.edit.metadata.save-button" | translate}}</span>
|
||||||
|
@@ -6,10 +6,10 @@
|
|||||||
<p class="pb-2">{{ 'community.delete.text' | translate:{ dso: dsoNameService.getName(dso) } }}</p>
|
<p class="pb-2">{{ 'community.delete.text' | translate:{ dso: dsoNameService.getName(dso) } }}</p>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<div class="col text-right space-children-mr">
|
<div class="col text-right space-children-mr">
|
||||||
<button class="btn btn-outline-secondary" (click)="onCancel(dso)" [dsDisabled]="(processing$ | async)">
|
<button class="btn btn-outline-secondary" (click)="onCancel(dso)" [dsBtnDisabled]="(processing$ | async)">
|
||||||
<i class="fas fa-times" aria-hidden="true"></i> {{'community.delete.cancel' | translate}}
|
<i class="fas fa-times" aria-hidden="true"></i> {{'community.delete.cancel' | translate}}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-danger" (click)="onConfirm(dso)" [dsDisabled]="(processing$ | async)">
|
<button class="btn btn-danger" (click)="onConfirm(dso)" [dsBtnDisabled]="(processing$ | async)">
|
||||||
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin' aria-hidden="true"></i> {{'community.delete.processing' | translate}}</span>
|
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin' aria-hidden="true"></i> {{'community.delete.processing' | translate}}</span>
|
||||||
<span *ngIf="!(processing$ | async)"><i class="fas fa-trash" aria-hidden="true"></i> {{'community.delete.confirm' | translate}}</span>
|
<span *ngIf="!(processing$ | async)"><i class="fas fa-trash" aria-hidden="true"></i> {{'community.delete.confirm' | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
|
@@ -71,31 +71,31 @@
|
|||||||
<button class="btn btn-outline-primary btn-sm ng-star-inserted" data-test="metadata-edit-btn" *ngIf="!mdValue.editing"
|
<button class="btn btn-outline-primary btn-sm ng-star-inserted" data-test="metadata-edit-btn" *ngIf="!mdValue.editing"
|
||||||
[title]="dsoType + '.edit.metadata.edit.buttons.edit' | translate"
|
[title]="dsoType + '.edit.metadata.edit.buttons.edit' | translate"
|
||||||
ngbTooltip="{{ dsoType + '.edit.metadata.edit.buttons.edit' | translate }}"
|
ngbTooltip="{{ dsoType + '.edit.metadata.edit.buttons.edit' | translate }}"
|
||||||
[dsDisabled]="isVirtual || mdValue.change === DsoEditMetadataChangeTypeEnum.REMOVE || (saving$ | async)" (click)="edit.emit()">
|
[dsBtnDisabled]="isVirtual || mdValue.change === DsoEditMetadataChangeTypeEnum.REMOVE || (saving$ | async)" (click)="edit.emit()">
|
||||||
<i class="fas fa-edit fa-fw"></i>
|
<i class="fas fa-edit fa-fw"></i>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-outline-success btn-sm ng-star-inserted" data-test="metadata-confirm-btn" *ngIf="mdValue.editing"
|
<button class="btn btn-outline-success btn-sm ng-star-inserted" data-test="metadata-confirm-btn" *ngIf="mdValue.editing"
|
||||||
[title]="dsoType + '.edit.metadata.edit.buttons.confirm' | translate"
|
[title]="dsoType + '.edit.metadata.edit.buttons.confirm' | translate"
|
||||||
ngbTooltip="{{ dsoType + '.edit.metadata.edit.buttons.confirm' | translate }}"
|
ngbTooltip="{{ dsoType + '.edit.metadata.edit.buttons.confirm' | translate }}"
|
||||||
[dsDisabled]="isVirtual || (saving$ | async)" (click)="confirm.emit(true)">
|
[dsBtnDisabled]="isVirtual || (saving$ | async)" (click)="confirm.emit(true)">
|
||||||
<i class="fas fa-check fa-fw"></i>
|
<i class="fas fa-check fa-fw"></i>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-outline-danger btn-sm" data-test="metadata-remove-btn"
|
<button class="btn btn-outline-danger btn-sm" data-test="metadata-remove-btn"
|
||||||
[title]="dsoType + '.edit.metadata.edit.buttons.remove' | translate"
|
[title]="dsoType + '.edit.metadata.edit.buttons.remove' | translate"
|
||||||
ngbTooltip="{{ dsoType + '.edit.metadata.edit.buttons.remove' | translate }}"
|
ngbTooltip="{{ dsoType + '.edit.metadata.edit.buttons.remove' | translate }}"
|
||||||
[dsDisabled]="isVirtual || (mdValue.change && mdValue.change !== DsoEditMetadataChangeTypeEnum.ADD) || mdValue.editing || (saving$ | async)" (click)="remove.emit()">
|
[dsBtnDisabled]="isVirtual || (mdValue.change && mdValue.change !== DsoEditMetadataChangeTypeEnum.ADD) || mdValue.editing || (saving$ | async)" (click)="remove.emit()">
|
||||||
<i class="fas fa-trash-alt fa-fw"></i>
|
<i class="fas fa-trash-alt fa-fw"></i>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-outline-warning btn-sm" data-test="metadata-undo-btn"
|
<button class="btn btn-outline-warning btn-sm" data-test="metadata-undo-btn"
|
||||||
[title]="dsoType + '.edit.metadata.edit.buttons.undo' | translate"
|
[title]="dsoType + '.edit.metadata.edit.buttons.undo' | translate"
|
||||||
ngbTooltip="{{ dsoType + '.edit.metadata.edit.buttons.undo' | translate }}"
|
ngbTooltip="{{ dsoType + '.edit.metadata.edit.buttons.undo' | translate }}"
|
||||||
[dsDisabled]="isVirtual || (!mdValue.change && mdValue.reordered) || (!mdValue.change && !mdValue.editing) || (saving$ | async)" (click)="undo.emit()">
|
[dsBtnDisabled]="isVirtual || (!mdValue.change && mdValue.reordered) || (!mdValue.change && !mdValue.editing) || (saving$ | async)" (click)="undo.emit()">
|
||||||
<i class="fas fa-undo-alt fa-fw"></i>
|
<i class="fas fa-undo-alt fa-fw"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<button class="btn btn-outline-secondary ds-drag-handle btn-sm" data-test="metadata-drag-btn" *ngVar="(isOnlyValue || (saving$ | async)) as disabled"
|
<button class="btn btn-outline-secondary ds-drag-handle btn-sm" data-test="metadata-drag-btn" *ngVar="(isOnlyValue || (saving$ | async)) as disabled"
|
||||||
cdkDragHandle [cdkDragHandleDisabled]="disabled" [ngClass]="{'disabled': disabled}" [dsDisabled]="disabled"
|
cdkDragHandle [cdkDragHandleDisabled]="disabled" [ngClass]="{'disabled': disabled}" [dsBtnDisabled]="disabled"
|
||||||
[title]="dsoType + '.edit.metadata.edit.buttons.drag' | translate"
|
[title]="dsoType + '.edit.metadata.edit.buttons.drag' | translate"
|
||||||
ngbTooltip="{{ dsoType + '.edit.metadata.edit.buttons.drag' | translate }}">
|
ngbTooltip="{{ dsoType + '.edit.metadata.edit.buttons.drag' | translate }}">
|
||||||
<i class="fas fa-grip-vertical fa-fw"></i>
|
<i class="fas fa-grip-vertical fa-fw"></i>
|
||||||
|
@@ -11,7 +11,7 @@ import { ItemMetadataRepresentation } from '../../../core/shared/metadata-repres
|
|||||||
import { MetadataValue, VIRTUAL_METADATA_PREFIX } from '../../../core/shared/metadata.models';
|
import { MetadataValue, VIRTUAL_METADATA_PREFIX } from '../../../core/shared/metadata.models';
|
||||||
import { DsoEditMetadataChangeType, DsoEditMetadataValue } from '../dso-edit-metadata-form';
|
import { DsoEditMetadataChangeType, DsoEditMetadataValue } from '../dso-edit-metadata-form';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import {DisabledDirective} from '../../../shared/disabled-directive';
|
import {BtnDisabledDirective} from '../../../shared/btn-disabled.directive';
|
||||||
|
|
||||||
const EDIT_BTN = 'edit';
|
const EDIT_BTN = 'edit';
|
||||||
const CONFIRM_BTN = 'confirm';
|
const CONFIRM_BTN = 'confirm';
|
||||||
@@ -50,7 +50,7 @@ describe('DsoEditMetadataValueComponent', () => {
|
|||||||
initServices();
|
initServices();
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [DsoEditMetadataValueComponent, VarDirective, DisabledDirective],
|
declarations: [DsoEditMetadataValueComponent, VarDirective, BtnDisabledDirective],
|
||||||
imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])],
|
imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: RelationshipDataService, useValue: relationshipService },
|
{ provide: RelationshipDataService, useValue: relationshipService },
|
||||||
|
@@ -1,18 +1,18 @@
|
|||||||
<div class="item-metadata" *ngIf="form">
|
<div class="item-metadata" *ngIf="form">
|
||||||
<div class="button-row top d-flex my-2 space-children-mr ml-gap">
|
<div class="button-row top d-flex my-2 space-children-mr ml-gap">
|
||||||
<button class="mr-auto btn btn-success" id="dso-add-btn" [dsDisabled]="form.newValue || (saving$ | async)"
|
<button class="mr-auto btn btn-success" id="dso-add-btn" [dsBtnDisabled]="form.newValue || (saving$ | async)"
|
||||||
[attr.aria-label]="dsoType + '.edit.metadata.add-button' | translate"
|
[attr.aria-label]="dsoType + '.edit.metadata.add-button' | translate"
|
||||||
[title]="dsoType + '.edit.metadata.add-button' | translate"
|
[title]="dsoType + '.edit.metadata.add-button' | translate"
|
||||||
(click)="add()"><i class="fas fa-plus" aria-hidden="true"></i>
|
(click)="add()"><i class="fas fa-plus" aria-hidden="true"></i>
|
||||||
<span class="d-none d-sm-inline"> {{ dsoType + '.edit.metadata.add-button' | translate }}</span>
|
<span class="d-none d-sm-inline"> {{ dsoType + '.edit.metadata.add-button' | translate }}</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-warning ml-1" id="dso-reinstate-btn" *ngIf="isReinstatable" [dsDisabled]="(saving$ | async)"
|
<button class="btn btn-warning ml-1" id="dso-reinstate-btn" *ngIf="isReinstatable" [dsBtnDisabled]="(saving$ | async)"
|
||||||
[attr.aria-label]="dsoType + '.edit.metadata.reinstate-button' | translate"
|
[attr.aria-label]="dsoType + '.edit.metadata.reinstate-button' | translate"
|
||||||
[title]="dsoType + '.edit.metadata.reinstate-button' | translate"
|
[title]="dsoType + '.edit.metadata.reinstate-button' | translate"
|
||||||
(click)="reinstate()"><i class="fas fa-undo-alt" aria-hidden="true"></i>
|
(click)="reinstate()"><i class="fas fa-undo-alt" aria-hidden="true"></i>
|
||||||
<span class="d-none d-sm-inline"> {{ dsoType + '.edit.metadata.reinstate-button' | translate }}</span>
|
<span class="d-none d-sm-inline"> {{ dsoType + '.edit.metadata.reinstate-button' | translate }}</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-primary ml-1" id="dso-save-btn" [dsDisabled]="!hasChanges || (saving$ | async)"
|
<button class="btn btn-primary ml-1" id="dso-save-btn" [dsBtnDisabled]="!hasChanges || (saving$ | async)"
|
||||||
[attr.aria-label]="dsoType + '.edit.metadata.save-button' | translate"
|
[attr.aria-label]="dsoType + '.edit.metadata.save-button' | translate"
|
||||||
[title]="dsoType + '.edit.metadata.save-button' | translate"
|
[title]="dsoType + '.edit.metadata.save-button' | translate"
|
||||||
(click)="submit()"><i class="fas fa-save" aria-hidden="true"></i>
|
(click)="submit()"><i class="fas fa-save" aria-hidden="true"></i>
|
||||||
@@ -21,7 +21,7 @@
|
|||||||
<button class="btn btn-danger ml-1" id="dso-discard-btn" *ngIf="!isReinstatable"
|
<button class="btn btn-danger ml-1" id="dso-discard-btn" *ngIf="!isReinstatable"
|
||||||
[attr.aria-label]="dsoType + '.edit.metadata.discard-button' | translate"
|
[attr.aria-label]="dsoType + '.edit.metadata.discard-button' | translate"
|
||||||
[title]="dsoType + '.edit.metadata.discard-button' | translate"
|
[title]="dsoType + '.edit.metadata.discard-button' | translate"
|
||||||
[dsDisabled]="!hasChanges || (saving$ | async)"
|
[dsBtnDisabled]="!hasChanges || (saving$ | async)"
|
||||||
(click)="discard()"><i class="fas fa-times" aria-hidden="true"></i>
|
(click)="discard()"><i class="fas fa-times" aria-hidden="true"></i>
|
||||||
<span class="d-none d-sm-inline"> {{ dsoType + '.edit.metadata.discard-button' | translate }}</span>
|
<span class="d-none d-sm-inline"> {{ dsoType + '.edit.metadata.discard-button' | translate }}</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -76,13 +76,13 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="button-row bottom d-inline-block w-100">
|
<div class="button-row bottom d-inline-block w-100">
|
||||||
<div class="mt-2 float-right space-children-mr ml-gap">
|
<div class="mt-2 float-right space-children-mr ml-gap">
|
||||||
<button class="btn btn-warning" *ngIf="isReinstatable" [dsDisabled]="(saving$ | async)"
|
<button class="btn btn-warning" *ngIf="isReinstatable" [dsBtnDisabled]="(saving$ | async)"
|
||||||
[attr.aria-label]="dsoType + '.edit.metadata.reinstate-button' | translate"
|
[attr.aria-label]="dsoType + '.edit.metadata.reinstate-button' | translate"
|
||||||
[title]="dsoType + '.edit.metadata.reinstate-button' | translate"
|
[title]="dsoType + '.edit.metadata.reinstate-button' | translate"
|
||||||
(click)="reinstate()">
|
(click)="reinstate()">
|
||||||
<i class="fas fa-undo-alt" aria-hidden="true"></i> {{ dsoType + '.edit.metadata.reinstate-button' | translate }}
|
<i class="fas fa-undo-alt" aria-hidden="true"></i> {{ dsoType + '.edit.metadata.reinstate-button' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-primary" [dsDisabled]="!hasChanges || (saving$ | async)"
|
<button class="btn btn-primary" [dsBtnDisabled]="!hasChanges || (saving$ | async)"
|
||||||
[attr.aria-label]="dsoType + '.edit.metadata.save-button' | translate"
|
[attr.aria-label]="dsoType + '.edit.metadata.save-button' | translate"
|
||||||
[title]="dsoType + '.edit.metadata.save-button' | translate"
|
[title]="dsoType + '.edit.metadata.save-button' | translate"
|
||||||
(click)="submit()">
|
(click)="submit()">
|
||||||
@@ -91,7 +91,7 @@
|
|||||||
<button class="btn btn-danger" *ngIf="!isReinstatable"
|
<button class="btn btn-danger" *ngIf="!isReinstatable"
|
||||||
[attr.aria-label]="dsoType + '.edit.metadata.discard-button' | translate"
|
[attr.aria-label]="dsoType + '.edit.metadata.discard-button' | translate"
|
||||||
[title]="dsoType + '.edit.metadata.discard-button' | translate"
|
[title]="dsoType + '.edit.metadata.discard-button' | translate"
|
||||||
[dsDisabled]="!hasChanges || (saving$ | async)"
|
[dsBtnDisabled]="!hasChanges || (saving$ | async)"
|
||||||
(click)="discard()">
|
(click)="discard()">
|
||||||
<i class="fas fa-times" aria-hidden="true"></i> {{ dsoType + '.edit.metadata.discard-button' | translate }}
|
<i class="fas fa-times" aria-hidden="true"></i> {{ dsoType + '.edit.metadata.discard-button' | translate }}
|
||||||
</button>
|
</button>
|
||||||
|
@@ -16,7 +16,7 @@ import { DATA_SERVICE_FACTORY } from '../../core/data/base/data-service.decorato
|
|||||||
import { Operation } from 'fast-json-patch';
|
import { Operation } from 'fast-json-patch';
|
||||||
import { RemoteData } from '../../core/data/remote-data';
|
import { RemoteData } from '../../core/data/remote-data';
|
||||||
import { Observable } from 'rxjs/internal/Observable';
|
import { Observable } from 'rxjs/internal/Observable';
|
||||||
import {DisabledDirective} from '../../shared/disabled-directive';
|
import {BtnDisabledDirective} from '../../shared/btn-disabled.directive';
|
||||||
|
|
||||||
const ADD_BTN = 'add';
|
const ADD_BTN = 'add';
|
||||||
const REINSTATE_BTN = 'reinstate';
|
const REINSTATE_BTN = 'reinstate';
|
||||||
@@ -72,7 +72,7 @@ describe('DsoEditMetadataComponent', () => {
|
|||||||
notificationsService = jasmine.createSpyObj('notificationsService', ['error', 'success']);
|
notificationsService = jasmine.createSpyObj('notificationsService', ['error', 'success']);
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [DsoEditMetadataComponent, VarDirective, DisabledDirective],
|
declarations: [DsoEditMetadataComponent, VarDirective, BtnDisabledDirective],
|
||||||
imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])],
|
imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])],
|
||||||
providers: [
|
providers: [
|
||||||
TestDataService,
|
TestDataService,
|
||||||
|
@@ -28,7 +28,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<button
|
<button
|
||||||
[dsDisabled]="isInValid"
|
[dsBtnDisabled]="isInValid"
|
||||||
class="btn btn-default btn-primary"
|
class="btn btn-default btn-primary"
|
||||||
(click)="submit()">{{'forgot-password.form.submit' | translate}}</button>
|
(click)="submit()">{{'forgot-password.form.submit' | translate}}</button>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
<div class="d-flex mt-4">
|
<div class="d-flex mt-4">
|
||||||
<button id="button-cancel" type="button" (click)="cancel()" class="btn btn-outline-secondary mr-auto">{{ 'info.end-user-agreement.buttons.cancel' | translate }}</button>
|
<button id="button-cancel" type="button" (click)="cancel()" class="btn btn-outline-secondary mr-auto">{{ 'info.end-user-agreement.buttons.cancel' | translate }}</button>
|
||||||
<button id="button-save" type="submit" class="btn btn-primary" [dsDisabled]="!accepted">{{ 'info.end-user-agreement.buttons.save' | translate }}</button>
|
<button id="button-save" type="submit" class="btn btn-primary" [dsBtnDisabled]="!accepted">{{ 'info.end-user-agreement.buttons.save' | translate }}</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -11,7 +11,7 @@ import { Store } from '@ngrx/store';
|
|||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { LogOutAction } from '../../core/auth/auth.actions';
|
import { LogOutAction } from '../../core/auth/auth.actions';
|
||||||
import { ActivatedRouteStub } from '../../shared/testing/active-router.stub';
|
import { ActivatedRouteStub } from '../../shared/testing/active-router.stub';
|
||||||
import {DisabledDirective} from '../../shared/disabled-directive';
|
import {BtnDisabledDirective} from '../../shared/btn-disabled.directive';
|
||||||
|
|
||||||
describe('EndUserAgreementComponent', () => {
|
describe('EndUserAgreementComponent', () => {
|
||||||
let component: EndUserAgreementComponent;
|
let component: EndUserAgreementComponent;
|
||||||
@@ -50,7 +50,7 @@ describe('EndUserAgreementComponent', () => {
|
|||||||
init();
|
init();
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot()],
|
imports: [TranslateModule.forRoot()],
|
||||||
declarations: [EndUserAgreementComponent, DisabledDirective],
|
declarations: [EndUserAgreementComponent, BtnDisabledDirective],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: EndUserAgreementService, useValue: endUserAgreementService },
|
{ provide: EndUserAgreementService, useValue: endUserAgreementService },
|
||||||
{ provide: NotificationsService, useValue: notificationsService },
|
{ provide: NotificationsService, useValue: notificationsService },
|
||||||
|
@@ -41,7 +41,7 @@
|
|||||||
|
|
||||||
<div class="row mt-3">
|
<div class="row mt-3">
|
||||||
<div class="control-group col-sm-12 text-right">
|
<div class="control-group col-sm-12 text-right">
|
||||||
<button [dsDisabled]="!feedbackForm.valid" class="btn btn-primary" name="submit" type="submit">{{ 'info.feedback.send' | translate }}</button>
|
<button [dsBtnDisabled]="!feedbackForm.valid" class="btn btn-primary" name="submit" type="submit">{{ 'info.feedback.send' | translate }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
@@ -18,7 +18,7 @@ import { Router } from '@angular/router';
|
|||||||
import { RouterMock } from '../../../shared/mocks/router.mock';
|
import { RouterMock } from '../../../shared/mocks/router.mock';
|
||||||
import { NativeWindowService } from '../../../core/services/window.service';
|
import { NativeWindowService } from '../../../core/services/window.service';
|
||||||
import { NativeWindowMockFactory } from '../../../shared/mocks/mock-native-window-ref';
|
import { NativeWindowMockFactory } from '../../../shared/mocks/mock-native-window-ref';
|
||||||
import {DisabledDirective} from '../../../shared/disabled-directive';
|
import {BtnDisabledDirective} from '../../../shared/btn-disabled.directive';
|
||||||
|
|
||||||
|
|
||||||
describe('FeedbackFormComponent', () => {
|
describe('FeedbackFormComponent', () => {
|
||||||
@@ -39,7 +39,7 @@ describe('FeedbackFormComponent', () => {
|
|||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot()],
|
imports: [TranslateModule.forRoot()],
|
||||||
declarations: [FeedbackFormComponent, DisabledDirective],
|
declarations: [FeedbackFormComponent, BtnDisabledDirective],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: RouteService, useValue: routeServiceStub },
|
{ provide: RouteService, useValue: routeServiceStub },
|
||||||
{ provide: UntypedFormBuilder, useValue: new UntypedFormBuilder() },
|
{ provide: UntypedFormBuilder, useValue: new UntypedFormBuilder() },
|
||||||
|
@@ -79,7 +79,7 @@
|
|||||||
</a>
|
</a>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
[dsDisabled]="requestCopyForm.invalid"
|
[dsBtnDisabled]="requestCopyForm.invalid"
|
||||||
class="btn btn-default btn-primary"
|
class="btn btn-default btn-primary"
|
||||||
(click)="onSubmit()">{{'bitstream-request-a-copy.submit' | translate}}</button>
|
(click)="onSubmit()">{{'bitstream-request-a-copy.submit' | translate}}</button>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
class="fas fa-undo-alt"></i>
|
class="fas fa-undo-alt"></i>
|
||||||
<span class="d-none d-sm-inline"> {{"item.edit.bitstreams.reinstate-button" | translate}}</span>
|
<span class="d-none d-sm-inline"> {{"item.edit.bitstreams.reinstate-button" | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-primary" [dsDisabled]="(hasChanges$ | async) !== true || submitting"
|
<button class="btn btn-primary" [dsBtnDisabled]="(hasChanges$ | async) !== true || submitting"
|
||||||
[attr.aria-label]="'item.edit.bitstreams.save-button' | translate"
|
[attr.aria-label]="'item.edit.bitstreams.save-button' | translate"
|
||||||
(click)="submit()"><i
|
(click)="submit()"><i
|
||||||
class="fas fa-save"></i>
|
class="fas fa-save"></i>
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<button class="btn btn-danger" *ngIf="(isReinstatable$ | async) !== true"
|
<button class="btn btn-danger" *ngIf="(isReinstatable$ | async) !== true"
|
||||||
[attr.aria-label]="'item.edit.bitstreams.discard-button' | translate"
|
[attr.aria-label]="'item.edit.bitstreams.discard-button' | translate"
|
||||||
[dsDisabled]="(hasChanges$ | async) !== true || submitting"
|
[dsBtnDisabled]="(hasChanges$ | async) !== true || submitting"
|
||||||
(click)="discard()"><i
|
(click)="discard()"><i
|
||||||
class="fas fa-times"></i>
|
class="fas fa-times"></i>
|
||||||
<span class="d-none d-sm-inline"> {{"item.edit.bitstreams.discard-button" | translate}}</span>
|
<span class="d-none d-sm-inline"> {{"item.edit.bitstreams.discard-button" | translate}}</span>
|
||||||
@@ -58,7 +58,7 @@
|
|||||||
class="fas fa-undo-alt"></i>
|
class="fas fa-undo-alt"></i>
|
||||||
<span class="d-none d-sm-inline"> {{"item.edit.bitstreams.reinstate-button" | translate}}</span>
|
<span class="d-none d-sm-inline"> {{"item.edit.bitstreams.reinstate-button" | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-primary" [dsDisabled]="(hasChanges$ | async) !== true || submitting"
|
<button class="btn btn-primary" [dsBtnDisabled]="(hasChanges$ | async) !== true || submitting"
|
||||||
[attr.aria-label]="'item.edit.bitstreams.save-button' | translate"
|
[attr.aria-label]="'item.edit.bitstreams.save-button' | translate"
|
||||||
(click)="submit()"><i
|
(click)="submit()"><i
|
||||||
class="fas fa-save"></i>
|
class="fas fa-save"></i>
|
||||||
@@ -66,7 +66,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<button class="btn btn-danger" *ngIf="(isReinstatable$ | async) !== true"
|
<button class="btn btn-danger" *ngIf="(isReinstatable$ | async) !== true"
|
||||||
[attr.aria-label]="'item.edit.bitstreams.discard-button' | translate"
|
[attr.aria-label]="'item.edit.bitstreams.discard-button' | translate"
|
||||||
[dsDisabled]="(hasChanges$ | async) !== true || submitting"
|
[dsBtnDisabled]="(hasChanges$ | async) !== true || submitting"
|
||||||
(click)="discard()"><i
|
(click)="discard()"><i
|
||||||
class="fas fa-times"></i>
|
class="fas fa-times"></i>
|
||||||
<span class="d-none d-sm-inline"> {{"item.edit.bitstreams.discard-button" | translate}}</span>
|
<span class="d-none d-sm-inline"> {{"item.edit.bitstreams.discard-button" | translate}}</span>
|
||||||
|
@@ -37,13 +37,13 @@
|
|||||||
title="{{'item.edit.bitstreams.edit.buttons.edit' | translate}}">
|
title="{{'item.edit.bitstreams.edit.buttons.edit' | translate}}">
|
||||||
<i class="fas fa-edit fa-fw"></i>
|
<i class="fas fa-edit fa-fw"></i>
|
||||||
</button>
|
</button>
|
||||||
<button [dsDisabled]="!canRemove()" (click)="remove()"
|
<button [dsBtnDisabled]="!canRemove()" (click)="remove()"
|
||||||
[attr.aria-label]="'item.edit.bitstreams.edit.buttons.remove' | translate"
|
[attr.aria-label]="'item.edit.bitstreams.edit.buttons.remove' | translate"
|
||||||
class="btn btn-outline-danger btn-sm"
|
class="btn btn-outline-danger btn-sm"
|
||||||
title="{{'item.edit.bitstreams.edit.buttons.remove' | translate}}">
|
title="{{'item.edit.bitstreams.edit.buttons.remove' | translate}}">
|
||||||
<i class="fas fa-trash-alt fa-fw"></i>
|
<i class="fas fa-trash-alt fa-fw"></i>
|
||||||
</button>
|
</button>
|
||||||
<button [dsDisabled]="!canUndo()" (click)="undo()"
|
<button [dsBtnDisabled]="!canUndo()" (click)="undo()"
|
||||||
[attr.aria-label]="'item.edit.bitstreams.edit.buttons.undo' | translate"
|
[attr.aria-label]="'item.edit.bitstreams.edit.buttons.undo' | translate"
|
||||||
class="btn btn-outline-warning btn-sm"
|
class="btn btn-outline-warning btn-sm"
|
||||||
title="{{'item.edit.bitstreams.edit.buttons.undo' | translate}}">
|
title="{{'item.edit.bitstreams.edit.buttons.undo' | translate}}">
|
||||||
|
@@ -86,10 +86,10 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<div class="space-children-mr">
|
<div class="space-children-mr">
|
||||||
<button [dsDisabled]="isDeleting$ | async" (click)="performAction()"
|
<button [dsBtnDisabled]="isDeleting$ | async" (click)="performAction()"
|
||||||
class="btn btn-outline-secondary perform-action">{{confirmMessage | translate}}
|
class="btn btn-outline-secondary perform-action">{{confirmMessage | translate}}
|
||||||
</button>
|
</button>
|
||||||
<button [dsDisabled]="isDeleting$ | async" [routerLink]="[itemPageRoute, 'edit']"
|
<button [dsBtnDisabled]="isDeleting$ | async" [routerLink]="[itemPageRoute, 'edit']"
|
||||||
class="btn btn-outline-secondary cancel">
|
class="btn btn-outline-secondary cancel">
|
||||||
{{cancelMessage| translate}}
|
{{cancelMessage| translate}}
|
||||||
</button>
|
</button>
|
||||||
|
@@ -40,7 +40,7 @@
|
|||||||
<button [routerLink]="[(itemPageRoute$ | async), 'edit']" class="btn btn-outline-secondary">
|
<button [routerLink]="[(itemPageRoute$ | async), 'edit']" class="btn btn-outline-secondary">
|
||||||
<i class="fas fa-arrow-left"></i> {{'item.edit.move.cancel' | translate}}
|
<i class="fas fa-arrow-left"></i> {{'item.edit.move.cancel' | translate}}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-primary" [dsDisabled]="!canMove" (click)="moveToCollection()">
|
<button class="btn btn-primary" [dsBtnDisabled]="!canMove" (click)="moveToCollection()">
|
||||||
<span *ngIf="!processing">
|
<span *ngIf="!processing">
|
||||||
<i class="fas fa-save"></i> {{'item.edit.move.save-button' | translate}}
|
<i class="fas fa-save"></i> {{'item.edit.move.save-button' | translate}}
|
||||||
</span>
|
</span>
|
||||||
@@ -48,7 +48,7 @@
|
|||||||
<i class="fas fa-circle-notch fa-spin"></i> {{'item.edit.move.processing' | translate}}
|
<i class="fas fa-circle-notch fa-spin"></i> {{'item.edit.move.processing' | translate}}
|
||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-danger" [dsDisabled]="!canSubmit" (click)="discard()">
|
<button class="btn btn-danger" [dsBtnDisabled]="!canSubmit" (click)="discard()">
|
||||||
<i class="fas fa-times"></i> {{"item.edit.move.discard-button" | translate}}
|
<i class="fas fa-times"></i> {{"item.edit.move.discard-button" | translate}}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -5,12 +5,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-9 float-left action-button">
|
<div class="col-9 float-left action-button">
|
||||||
<span *ngIf="operation.authorized">
|
<span *ngIf="operation.authorized">
|
||||||
<button class="btn btn-outline-primary" [dsDisabled]="operation.disabled" [routerLink]="operation.operationUrl" [attr.aria-label]="'item.edit.tabs.status.buttons.' + operation.operationKey + '.button' | translate">
|
<button class="btn btn-outline-primary" [dsBtnDisabled]="operation.disabled" [routerLink]="operation.operationUrl" [attr.aria-label]="'item.edit.tabs.status.buttons.' + operation.operationKey + '.button' | translate">
|
||||||
{{'item.edit.tabs.status.buttons.' + operation.operationKey + '.button' | translate}}
|
{{'item.edit.tabs.status.buttons.' + operation.operationKey + '.button' | translate}}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
<span *ngIf="!operation.authorized" [ngbTooltip]="'item.edit.tabs.status.buttons.unauthorized' | translate">
|
<span *ngIf="!operation.authorized" [ngbTooltip]="'item.edit.tabs.status.buttons.unauthorized' | translate">
|
||||||
<button class="btn btn-outline-primary" [dsDisabled]="true" [attr.aria-label]="'item.edit.tabs.status.buttons.' + operation.operationKey + '.button' | translate">
|
<button class="btn btn-outline-primary" [dsBtnDisabled]="true" [attr.aria-label]="'item.edit.tabs.status.buttons.' + operation.operationKey + '.button' | translate">
|
||||||
{{'item.edit.tabs.status.buttons.' + operation.operationKey + '.button' | translate}}
|
{{'item.edit.tabs.status.buttons.' + operation.operationKey + '.button' | translate}}
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
|
@@ -4,7 +4,7 @@ import { ItemOperationComponent } from './item-operation.component';
|
|||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { RouterTestingModule } from '@angular/router/testing';
|
import { RouterTestingModule } from '@angular/router/testing';
|
||||||
import {DisabledDirective} from '../../../shared/disabled-directive';
|
import {BtnDisabledDirective} from '../../../shared/btn-disabled.directive';
|
||||||
|
|
||||||
describe('ItemOperationComponent', () => {
|
describe('ItemOperationComponent', () => {
|
||||||
let itemOperation: ItemOperation;
|
let itemOperation: ItemOperation;
|
||||||
@@ -15,7 +15,7 @@ describe('ItemOperationComponent', () => {
|
|||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])],
|
imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([])],
|
||||||
declarations: [ItemOperationComponent, DisabledDirective]
|
declarations: [ItemOperationComponent, BtnDisabledDirective]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<h2 class="h4">
|
<h2 class="h4">
|
||||||
{{relationshipMessageKey$ | async | translate}}
|
{{relationshipMessageKey$ | async | translate}}
|
||||||
<button class="ml-2 btn btn-success" [dsDisabled]="(hasChanges | async)" (click)="openLookup()">
|
<button class="ml-2 btn btn-success" [dsBtnDisabled]="(hasChanges | async)" (click)="openLookup()">
|
||||||
<i class="fas fa-plus"></i>
|
<i class="fas fa-plus"></i>
|
||||||
<span class="d-none d-sm-inline"> {{"item.edit.relationships.edit.buttons.add" | translate}}</span>
|
<span class="d-none d-sm-inline"> {{"item.edit.relationships.edit.buttons.add" | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
|
@@ -9,12 +9,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
<div class="btn-group relationship-action-buttons">
|
<div class="btn-group relationship-action-buttons">
|
||||||
<button [dsDisabled]="!canRemove()" (click)="openVirtualMetadataModal(virtualMetadataModal)"
|
<button [dsBtnDisabled]="!canRemove()" (click)="openVirtualMetadataModal(virtualMetadataModal)"
|
||||||
class="btn btn-outline-danger btn-sm"
|
class="btn btn-outline-danger btn-sm"
|
||||||
title="{{'item.edit.metadata.edit.buttons.remove' | translate}}">
|
title="{{'item.edit.metadata.edit.buttons.remove' | translate}}">
|
||||||
<i class="fas fa-trash-alt fa-fw"></i>
|
<i class="fas fa-trash-alt fa-fw"></i>
|
||||||
</button>
|
</button>
|
||||||
<button [dsDisabled]="!canUndo()" (click)="undo()"
|
<button [dsBtnDisabled]="!canUndo()" (click)="undo()"
|
||||||
class="btn btn-outline-warning btn-sm"
|
class="btn btn-outline-warning btn-sm"
|
||||||
title="{{'item.edit.metadata.edit.buttons.undo' | translate}}">
|
title="{{'item.edit.metadata.edit.buttons.undo' | translate}}">
|
||||||
<i class="fas fa-undo-alt fa-fw"></i>
|
<i class="fas fa-undo-alt fa-fw"></i>
|
||||||
|
@@ -35,7 +35,7 @@
|
|||||||
<ng-template #buttons>
|
<ng-template #buttons>
|
||||||
<div class="d-flex space-children-mr justify-content-end">
|
<div class="d-flex space-children-mr justify-content-end">
|
||||||
<button class="btn btn-danger" *ngIf="(isReinstatable$ | async) !== true"
|
<button class="btn btn-danger" *ngIf="(isReinstatable$ | async) !== true"
|
||||||
[dsDisabled]="(hasChanges$ | async) !== true"
|
[dsBtnDisabled]="(hasChanges$ | async) !== true"
|
||||||
(click)="discard()">
|
(click)="discard()">
|
||||||
<i aria-hidden="true" class="fas fa-times"></i>
|
<i aria-hidden="true" class="fas fa-times"></i>
|
||||||
<span class="d-none d-sm-inline"> {{ 'item.edit.metadata.discard-button' | translate }}</span>
|
<span class="d-none d-sm-inline"> {{ 'item.edit.metadata.discard-button' | translate }}</span>
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
<span class="d-none d-sm-inline"> {{ 'item.edit.metadata.reinstate-button' | translate }}</span>
|
<span class="d-none d-sm-inline"> {{ 'item.edit.metadata.reinstate-button' | translate }}</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-primary"
|
<button class="btn btn-primary"
|
||||||
[dsDisabled]="(hasChanges$ | async) !== true || (isSaving$ | async) === true"
|
[dsBtnDisabled]="(hasChanges$ | async) !== true || (isSaving$ | async) === true"
|
||||||
(click)="submit()">
|
(click)="submit()">
|
||||||
<span *ngIf="isSaving$ | async" aria-hidden="true" class="spinner-border spinner-border-sm" role="status"></span>
|
<span *ngIf="isSaving$ | async" aria-hidden="true" class="spinner-border spinner-border-sm" role="status"></span>
|
||||||
<i *ngIf="(isSaving$ | async) !== true" aria-hidden="true" class="fas fa-save"></i>
|
<i *ngIf="(isSaving$ | async) !== true" aria-hidden="true" class="fas fa-save"></i>
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
<div class="buttons" *ngIf="medias?.length > 1">
|
<div class="buttons" *ngIf="medias?.length > 1">
|
||||||
<button
|
<button
|
||||||
class="btn btn-primary previous"
|
class="btn btn-primary previous"
|
||||||
[dsDisabled]="currentIndex === 0"
|
[dsBtnDisabled]="currentIndex === 0"
|
||||||
(click)="prevMedia()"
|
(click)="prevMedia()"
|
||||||
>
|
>
|
||||||
{{ "media-viewer.previous" | translate }}
|
{{ "media-viewer.previous" | translate }}
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
|
|
||||||
<button
|
<button
|
||||||
class="btn btn-primary next"
|
class="btn btn-primary next"
|
||||||
[dsDisabled]="currentIndex === medias.length - 1"
|
[dsBtnDisabled]="currentIndex === medias.length - 1"
|
||||||
(click)="nextMedia()"
|
(click)="nextMedia()"
|
||||||
>
|
>
|
||||||
{{ "media-viewer.next" | translate }}
|
{{ "media-viewer.next" | translate }}
|
||||||
|
@@ -48,7 +48,7 @@
|
|||||||
<div class="row" *ngIf="(ownerCanDisconnectProfileFromOrcid() | async)" data-test="unlinkOwner">
|
<div class="row" *ngIf="(ownerCanDisconnectProfileFromOrcid() | async)" data-test="unlinkOwner">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<button type="submit" class="btn btn-danger float-right" (click)="unlinkOrcid()"
|
<button type="submit" class="btn btn-danger float-right" (click)="unlinkOrcid()"
|
||||||
[dsDisabled]="(unlinkProcessing | async)">
|
[dsBtnDisabled]="(unlinkProcessing | async)">
|
||||||
<span *ngIf="!(unlinkProcessing | async)"><i
|
<span *ngIf="!(unlinkProcessing | async)"><i
|
||||||
class="fas fa-unlink"></i> {{ 'person.page.orcid.unlink' | translate }}</span>
|
class="fas fa-unlink"></i> {{ 'person.page.orcid.unlink' | translate }}</span>
|
||||||
<span *ngIf="(unlinkProcessing | async)"><i
|
<span *ngIf="(unlinkProcessing | async)"><i
|
||||||
|
@@ -63,7 +63,7 @@
|
|||||||
<!--CREATE-->
|
<!--CREATE-->
|
||||||
<ng-container *ngIf="canCreateVersion$ | async">
|
<ng-container *ngIf="canCreateVersion$ | async">
|
||||||
<button class="btn btn-outline-primary btn-sm version-row-element-create"
|
<button class="btn btn-outline-primary btn-sm version-row-element-create"
|
||||||
[dsDisabled]="isAnyBeingEdited() || (hasDraftVersion$ | async)"
|
[dsBtnDisabled]="isAnyBeingEdited() || (hasDraftVersion$ | async)"
|
||||||
(click)="createNewVersion(version)"
|
(click)="createNewVersion(version)"
|
||||||
title="{{createVersionTitle$ | async | translate }}">
|
title="{{createVersionTitle$ | async | translate }}">
|
||||||
<i class="fas fa-code-branch fa-fw"></i>
|
<i class="fas fa-code-branch fa-fw"></i>
|
||||||
@@ -73,7 +73,7 @@
|
|||||||
<ng-container *ngIf="canDeleteVersion$(version) | async">
|
<ng-container *ngIf="canDeleteVersion$(version) | async">
|
||||||
<button class="btn btn-sm version-row-element-delete"
|
<button class="btn btn-sm version-row-element-delete"
|
||||||
[ngClass]="isAnyBeingEdited() ? 'btn-outline-primary' : 'btn-outline-danger'"
|
[ngClass]="isAnyBeingEdited() ? 'btn-outline-primary' : 'btn-outline-danger'"
|
||||||
[dsDisabled]="isAnyBeingEdited()"
|
[dsBtnDisabled]="isAnyBeingEdited()"
|
||||||
(click)="deleteVersion(version, version.id==itemVersion.id)"
|
(click)="deleteVersion(version, version.id==itemVersion.id)"
|
||||||
title="{{'item.version.history.table.action.deleteVersion' | translate}}">
|
title="{{'item.version.history.table.action.deleteVersion' | translate}}">
|
||||||
<i class="fas fa-trash fa-fw"></i>
|
<i class="fas fa-trash fa-fw"></i>
|
||||||
@@ -117,7 +117,7 @@
|
|||||||
<ng-container *ngIf="canEditVersion$(version) | async">
|
<ng-container *ngIf="canEditVersion$(version) | async">
|
||||||
<button class="btn btn-outline-primary btn-sm version-row-element-edit"
|
<button class="btn btn-outline-primary btn-sm version-row-element-edit"
|
||||||
*ngIf="!isThisBeingEdited(version)"
|
*ngIf="!isThisBeingEdited(version)"
|
||||||
[dsDisabled]="isAnyBeingEdited()"
|
[dsBtnDisabled]="isAnyBeingEdited()"
|
||||||
(click)="enableVersionEditing(version)"
|
(click)="enableVersionEditing(version)"
|
||||||
title="{{'item.version.history.table.action.editSummary' | translate}}">
|
title="{{'item.version.history.table.action.editSummary' | translate}}">
|
||||||
<i class="fas fa-edit fa-fw"></i>
|
<i class="fas fa-edit fa-fw"></i>
|
||||||
|
@@ -29,7 +29,7 @@ import { ConfigurationDataService } from '../../core/data/configuration-data.ser
|
|||||||
import { Router } from '@angular/router';
|
import { Router } from '@angular/router';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { ItemSharedModule } from '../item-shared.module';
|
import { ItemSharedModule } from '../item-shared.module';
|
||||||
import {DisabledDirective} from '../../shared/disabled-directive';
|
import {BtnDisabledDirective} from '../../shared/btn-disabled.directive';
|
||||||
|
|
||||||
describe('ItemVersionsComponent', () => {
|
describe('ItemVersionsComponent', () => {
|
||||||
let component: ItemVersionsComponent;
|
let component: ItemVersionsComponent;
|
||||||
@@ -137,7 +137,7 @@ describe('ItemVersionsComponent', () => {
|
|||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [ItemVersionsComponent, VarDirective, DisabledDirective],
|
declarations: [ItemVersionsComponent, VarDirective, BtnDisabledDirective],
|
||||||
imports: [TranslateModule.forRoot(), CommonModule, FormsModule, ReactiveFormsModule, BrowserModule, ItemSharedModule],
|
imports: [TranslateModule.forRoot(), CommonModule, FormsModule, ReactiveFormsModule, BrowserModule, ItemSharedModule],
|
||||||
providers: [
|
providers: [
|
||||||
{provide: PaginationService, useValue: new PaginationServiceStub()},
|
{provide: PaginationService, useValue: new PaginationServiceStub()},
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<div class="add" *ngIf="!(moreThanOne$ | async)">
|
<div class="add" *ngIf="!(moreThanOne$ | async)">
|
||||||
<button class="btn btn-lg btn-outline-primary mt-1 ml-2"
|
<button class="btn btn-lg btn-outline-primary mt-1 ml-2"
|
||||||
[attr.aria-label]="'mydspace.new-submission-external' | translate" [dsDisabled]="!(initialized$|async)"
|
[attr.aria-label]="'mydspace.new-submission-external' | translate" [dsBtnDisabled]="!(initialized$|async)"
|
||||||
(click)="openPage(singleEntity)" role="button"
|
(click)="openPage(singleEntity)" role="button"
|
||||||
title="{{'mydspace.new-submission-external' | translate}}">
|
title="{{'mydspace.new-submission-external' | translate}}">
|
||||||
<i class="fa fa-file-import" aria-hidden="true"></i>
|
<i class="fa fa-file-import" aria-hidden="true"></i>
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
ngbDropdown
|
ngbDropdown
|
||||||
*ngIf="(moreThanOne$ | async)">
|
*ngIf="(moreThanOne$ | async)">
|
||||||
<button class="btn btn-lg btn-outline-primary mt-1 ml-2" id="dropdownImport" ngbDropdownToggle
|
<button class="btn btn-lg btn-outline-primary mt-1 ml-2" id="dropdownImport" ngbDropdownToggle
|
||||||
type="button" [dsDisabled]="!(initialized$|async)"
|
type="button" [dsBtnDisabled]="!(initialized$|async)"
|
||||||
[attr.aria-label]="'mydspace.new-submission-external' | translate"
|
[attr.aria-label]="'mydspace.new-submission-external' | translate"
|
||||||
[attr.data-test]="'import-dropdown' | dsBrowserOnly"
|
[attr.data-test]="'import-dropdown' | dsBrowserOnly"
|
||||||
title="{{'mydspace.new-submission-external' | translate}}">
|
title="{{'mydspace.new-submission-external' | translate}}">
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<div class="add" *ngIf="!(moreThanOne$ | async)">
|
<div class="add" *ngIf="!(moreThanOne$ | async)">
|
||||||
<button class="btn btn-lg btn-primary mt-1 ml-2" [attr.aria-label]="'mydspace.new-submission' | translate"
|
<button class="btn btn-lg btn-primary mt-1 ml-2" [attr.aria-label]="'mydspace.new-submission' | translate"
|
||||||
[dsDisabled]="!(initialized$|async)" (click)="openDialog(singleEntity)" role="button">
|
[dsBtnDisabled]="!(initialized$|async)" (click)="openDialog(singleEntity)" role="button">
|
||||||
<i class="fa fa-plus-circle" aria-hidden="true"></i>
|
<i class="fa fa-plus-circle" aria-hidden="true"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
ngbDropdown
|
ngbDropdown
|
||||||
*ngIf="(moreThanOne$ | async)">
|
*ngIf="(moreThanOne$ | async)">
|
||||||
<button class="btn btn-lg btn-primary mt-1 ml-2" id="dropdownSubmission" ngbDropdownToggle
|
<button class="btn btn-lg btn-primary mt-1 ml-2" id="dropdownSubmission" ngbDropdownToggle
|
||||||
type="button" [dsDisabled]="!(initialized$|async)"
|
type="button" [dsBtnDisabled]="!(initialized$|async)"
|
||||||
[attr.aria-label]="'mydspace.new-submission' | translate"
|
[attr.aria-label]="'mydspace.new-submission' | translate"
|
||||||
[attr.data-test]="'submission-dropdown' | dsBrowserOnly"
|
[attr.data-test]="'submission-dropdown' | dsBrowserOnly"
|
||||||
title="{{'mydspace.new-submission' | translate}}">
|
title="{{'mydspace.new-submission' | translate}}">
|
||||||
|
@@ -77,10 +77,10 @@
|
|||||||
<span> {{ 'process.overview.delete.processing' | translate: {count: processBulkDeleteService.getAmountOfSelectedProcesses()} }}</span>
|
<span> {{ 'process.overview.delete.processing' | translate: {count: processBulkDeleteService.getAmountOfSelectedProcesses()} }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<button class="btn btn-primary mr-2" [dsDisabled]="processBulkDeleteService.isProcessing$() |async"
|
<button class="btn btn-primary mr-2" [dsBtnDisabled]="processBulkDeleteService.isProcessing$() |async"
|
||||||
(click)="closeModal()">{{'process.detail.delete.cancel' | translate}}</button>
|
(click)="closeModal()">{{'process.detail.delete.cancel' | translate}}</button>
|
||||||
<button id="delete-confirm" class="btn btn-danger"
|
<button id="delete-confirm" class="btn btn-danger"
|
||||||
[dsDisabled]="processBulkDeleteService.isProcessing$() |async"
|
[dsBtnDisabled]="processBulkDeleteService.isProcessing$() |async"
|
||||||
(click)="deleteSelected()">{{ 'process.overview.delete' | translate: {count: processBulkDeleteService.getAmountOfSelectedProcesses()} }}
|
(click)="deleteSelected()">{{ 'process.overview.delete' | translate: {count: processBulkDeleteService.getAmountOfSelectedProcesses()} }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
<input type="checkbox" [checked]="checked" (change)="toggleCheckbox()"/>
|
<input type="checkbox" [checked]="checked" (change)="toggleCheckbox()"/>
|
||||||
{{ 'dso-selector.claim.item.not-mine-label' | translate }}
|
{{ 'dso-selector.claim.item.not-mine-label' | translate }}
|
||||||
</div>
|
</div>
|
||||||
<button type="submit" class="btn btn-primary ml-5 mr-2" (click)="createFromScratch()" [dsDisabled]="!checked">
|
<button type="submit" class="btn btn-primary ml-5 mr-2" (click)="createFromScratch()" [dsBtnDisabled]="!checked">
|
||||||
<i class="fas fa-plus"></i>
|
<i class="fas fa-plus"></i>
|
||||||
{{ 'dso-selector.claim.item.create-from-scratch' | translate }}
|
{{ 'dso-selector.claim.item.create-from-scratch' | translate }}
|
||||||
</button>
|
</button>
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
<p>{{'researcher.profile.not.associated' | translate}}</p>
|
<p>{{'researcher.profile.not.associated' | translate}}</p>
|
||||||
</div>
|
</div>
|
||||||
<button *ngIf="!researcherProfile" class="btn btn-primary mr-2"
|
<button *ngIf="!researcherProfile" class="btn btn-primary mr-2"
|
||||||
[dsDisabled]="(isProcessingCreate() | async)"
|
[dsBtnDisabled]="(isProcessingCreate() | async)"
|
||||||
(click)="createProfile()">
|
(click)="createProfile()">
|
||||||
<span *ngIf="(isProcessingCreate() | async)">
|
<span *ngIf="(isProcessingCreate() | async)">
|
||||||
<i class='fas fa-circle-notch fa-spin'></i> {{'researcher.profile.action.processing' | translate}}
|
<i class='fas fa-circle-notch fa-spin'></i> {{'researcher.profile.action.processing' | translate}}
|
||||||
@@ -23,10 +23,10 @@
|
|||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<ng-container *ngIf="researcherProfile">
|
<ng-container *ngIf="researcherProfile">
|
||||||
<button class="btn btn-primary mr-2" [dsDisabled]="!researcherProfile" (click)="viewProfile(researcherProfile)">
|
<button class="btn btn-primary mr-2" [dsBtnDisabled]="!researcherProfile" (click)="viewProfile(researcherProfile)">
|
||||||
<i class="fas fa-info-circle"></i> {{'researcher.profile.view' | translate}}
|
<i class="fas fa-info-circle"></i> {{'researcher.profile.view' | translate}}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-danger" [dsDisabled]="!researcherProfile" (click)="deleteProfile(researcherProfile)">
|
<button class="btn btn-danger" [dsBtnDisabled]="!researcherProfile" (click)="deleteProfile(researcherProfile)">
|
||||||
<span *ngIf="(isProcessingDelete() | async)">
|
<span *ngIf="(isProcessingDelete() | async)">
|
||||||
<i class='fas fa-circle-notch fa-spin'></i> {{'researcher.profile.action.processing' | translate}}
|
<i class='fas fa-circle-notch fa-spin'></i> {{'researcher.profile.action.processing' | translate}}
|
||||||
</span>
|
</span>
|
||||||
|
@@ -48,13 +48,13 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ng-container *ngIf="!((googleRecaptchaService.captchaVersion() | async) === 'v2' && (googleRecaptchaService.captchaMode() | async) === 'invisible'); else v2Invisible">
|
<ng-container *ngIf="!((googleRecaptchaService.captchaVersion() | async) === 'v2' && (googleRecaptchaService.captchaMode() | async) === 'invisible'); else v2Invisible">
|
||||||
<button class="btn btn-primary" [dsDisabled]="form.invalid || registrationVerification && !isRecaptchaCookieAccepted() || disableUntilChecked" (click)="register()">
|
<button class="btn btn-primary" [dsBtnDisabled]="form.invalid || registrationVerification && !isRecaptchaCookieAccepted() || disableUntilChecked" (click)="register()">
|
||||||
{{ MESSAGE_PREFIX + '.submit' | translate }}
|
{{ MESSAGE_PREFIX + '.submit' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-template #v2Invisible>
|
<ng-template #v2Invisible>
|
||||||
<button class="btn btn-primary" [dsDisabled]="form.invalid" (click)="executeRecaptcha()">
|
<button class="btn btn-primary" [dsBtnDisabled]="form.invalid" (click)="executeRecaptcha()">
|
||||||
{{ MESSAGE_PREFIX + '.submit' | translate }}
|
{{ MESSAGE_PREFIX + '.submit' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
@@ -81,7 +81,7 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<button
|
<button
|
||||||
[dsDisabled]="isInValidPassword || userInfoForm.invalid"
|
[dsBtnDisabled]="isInValidPassword || userInfoForm.invalid"
|
||||||
class="btn btn-default btn-primary"
|
class="btn btn-default btn-primary"
|
||||||
(click)="submitEperson()">{{'register-page.create-profile.submit' | translate}}</button>
|
(click)="submitEperson()">{{'register-page.create-profile.submit' | translate}}</button>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
<ng-content></ng-content>
|
<ng-content></ng-content>
|
||||||
<div class="d-flex flex-row-reverse">
|
<div class="d-flex flex-row-reverse">
|
||||||
<button (click)="submit()"
|
<button (click)="submit()"
|
||||||
[dsDisabled]="!subject || subject.length === 0"
|
[dsBtnDisabled]="!subject || subject.length === 0"
|
||||||
class="btn btn-primary"
|
class="btn btn-primary"
|
||||||
title="{{'grant-deny-request-copy.email.send' | translate }}">
|
title="{{'grant-deny-request-copy.email.send' | translate }}">
|
||||||
<i class="fas fa-envelope"></i> {{'grant-deny-request-copy.email.send' | translate }}
|
<i class="fas fa-envelope"></i> {{'grant-deny-request-copy.email.send' | translate }}
|
||||||
|
@@ -47,7 +47,7 @@
|
|||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<button
|
<button
|
||||||
class="btn btn-outline-secondary fas fa-calendar"
|
class="btn btn-outline-secondary fas fa-calendar"
|
||||||
[dsDisabled]="ngForm.disabled"
|
[dsBtnDisabled]="ngForm.disabled"
|
||||||
(click)="d.toggle()" type="button">
|
(click)="d.toggle()" type="button">
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -76,7 +76,7 @@
|
|||||||
<div class="input-group-append">
|
<div class="input-group-append">
|
||||||
<button
|
<button
|
||||||
type="button" class="btn btn-outline-secondary fas fa-calendar"
|
type="button" class="btn btn-outline-secondary fas fa-calendar"
|
||||||
[dsDisabled]="ngForm.disabled"
|
[dsBtnDisabled]="ngForm.disabled"
|
||||||
(click)="d1.toggle()">
|
(click)="d1.toggle()">
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -93,7 +93,7 @@
|
|||||||
|
|
||||||
<button type="button" class="btn btn-outline-danger"
|
<button type="button" class="btn btn-outline-danger"
|
||||||
[attr.aria-label]="'access-control-remove' | translate"
|
[attr.aria-label]="'access-control-remove' | translate"
|
||||||
[dsDisabled]="ngForm.disabled || form.accessControls.length === 1"
|
[dsBtnDisabled]="ngForm.disabled || form.accessControls.length === 1"
|
||||||
(click)="removeAccessControlItem(control.id)">
|
(click)="removeAccessControlItem(control.id)">
|
||||||
<i class="fas fa-trash"></i>
|
<i class="fas fa-trash"></i>
|
||||||
</button>
|
</button>
|
||||||
@@ -103,7 +103,7 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<button type="button" id="add-btn-{{type}}" class="btn btn-outline-primary mt-3"
|
<button type="button" id="add-btn-{{type}}" class="btn btn-outline-primary mt-3"
|
||||||
[dsDisabled]="ngForm.disabled"
|
[dsBtnDisabled]="ngForm.disabled"
|
||||||
(click)="addAccessControlItem()">
|
(click)="addAccessControlItem()">
|
||||||
<i class="fas fa-plus"></i>
|
<i class="fas fa-plus"></i>
|
||||||
{{'access-control-add-more' | translate}}
|
{{'access-control-add-more' | translate}}
|
||||||
|
@@ -103,7 +103,7 @@
|
|||||||
<button
|
<button
|
||||||
*ngIf="itemRD"
|
*ngIf="itemRD"
|
||||||
[attr.aria-label]="'access-control-bitstreams-select' | translate"
|
[attr.aria-label]="'access-control-bitstreams-select' | translate"
|
||||||
[dsDisabled]="!state.bitstream.toggleStatus || state.bitstream.changesLimit !== 'selected'"
|
[dsBtnDisabled]="!state.bitstream.toggleStatus || state.bitstream.changesLimit !== 'selected'"
|
||||||
(click)="openSelectBitstreamsModal(itemRD.payload)"
|
(click)="openSelectBitstreamsModal(itemRD.payload)"
|
||||||
class="btn btn-outline-dark border-0" type="button">
|
class="btn btn-outline-dark border-0" type="button">
|
||||||
<i class="fa fa-search"></i>
|
<i class="fa fa-search"></i>
|
||||||
@@ -161,7 +161,7 @@
|
|||||||
{{ 'access-control-cancel' | translate }}
|
{{ 'access-control-cancel' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-primary"
|
<button class="btn btn-primary"
|
||||||
[dsDisabled]="!state.item.toggleStatus && !state.bitstream.toggleStatus"
|
[dsBtnDisabled]="!state.item.toggleStatus && !state.bitstream.toggleStatus"
|
||||||
(click)="submit()" type="submit">
|
(click)="submit()" type="submit">
|
||||||
{{ 'access-control-execute' | translate }}
|
{{ 'access-control-execute' | translate }}
|
||||||
</button>
|
</button>
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
import { Directive, Input, HostBinding, HostListener } from '@angular/core';
|
import { Directive, Input, HostBinding, HostListener } from '@angular/core';
|
||||||
|
|
||||||
@Directive({
|
@Directive({
|
||||||
selector: '[dsDisabled]'
|
selector: '[dsBtnDisabled]'
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -10,7 +10,7 @@ import { Directive, Input, HostBinding, HostListener } from '@angular/core';
|
|||||||
*
|
*
|
||||||
* This directive should always be used instead of the HTML disabled attribute as it is more accessible.
|
* This directive should always be used instead of the HTML disabled attribute as it is more accessible.
|
||||||
*/
|
*/
|
||||||
export class DisabledDirective {
|
export class BtnDisabledDirective {
|
||||||
|
|
||||||
@Input() set dsDisabled(value: boolean) {
|
@Input() set dsDisabled(value: boolean) {
|
||||||
this.isDisabled = !!value;
|
this.isDisabled = !!value;
|
@@ -1,11 +1,11 @@
|
|||||||
import { Component, DebugElement } from '@angular/core';
|
import { Component, DebugElement } from '@angular/core';
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { DisabledDirective } from './disabled-directive';
|
import { BtnDisabledDirective } from './btn-disabled.directive';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
template: `
|
template: `
|
||||||
<button [dsDisabled]="isDisabled">Test Button</button>
|
<button [dsBtnDisabled]="isDisabled">Test Button</button>
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
class TestComponent {
|
class TestComponent {
|
||||||
@@ -19,7 +19,7 @@ describe('DisabledDirective', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [TestComponent, DisabledDirective]
|
declarations: [TestComponent, BtnDisabledDirective]
|
||||||
});
|
});
|
||||||
fixture = TestBed.createComponent(TestComponent);
|
fixture = TestBed.createComponent(TestComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
class="btn btn-outline-primary selection"
|
class="btn btn-outline-primary selection"
|
||||||
(blur)="close.emit($event)"
|
(blur)="close.emit($event)"
|
||||||
(click)="close.emit($event)"
|
(click)="close.emit($event)"
|
||||||
[dsDisabled]="disabled"
|
[dsBtnDisabled]="disabled"
|
||||||
ngbDropdownToggle>
|
ngbDropdownToggle>
|
||||||
<ng-content select=".selection"></ng-content>
|
<ng-content select=".selection"></ng-content>
|
||||||
</button>
|
</button>
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<div class="dso-button-menu mb-1" ngbDropdown container="body" placement="bottom-right">
|
<div class="dso-button-menu mb-1" ngbDropdown container="body" placement="bottom-right">
|
||||||
<div class="d-flex flex-row flex-nowrap"
|
<div class="d-flex flex-row flex-nowrap"
|
||||||
[ngbTooltip]="itemModel.text | translate" container="body">
|
[ngbTooltip]="itemModel.text | translate" container="body">
|
||||||
<button [attr.aria-label]="itemModel.text | translate" [title]="itemModel.text | translate" class="btn btn-dark btn-sm" ngbDropdownToggle [dsDisabled]="section.model?.disabled">
|
<button [attr.aria-label]="itemModel.text | translate" [title]="itemModel.text | translate" class="btn btn-dark btn-sm" ngbDropdownToggle [dsBtnDisabled]="section.model?.disabled">
|
||||||
<i class="fas fa-{{section.icon}} fa-fw"></i>
|
<i class="fas fa-{{section.icon}} fa-fw"></i>
|
||||||
</button>
|
</button>
|
||||||
<ul ngbDropdownMenu class="dso-edit-menu-dropdown">
|
<ul ngbDropdownMenu class="dso-edit-menu-dropdown">
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
<i class="fas fa-{{section.icon}} fa-fw" aria-hidden="true"></i>
|
<i class="fas fa-{{section.icon}} fa-fw" aria-hidden="true"></i>
|
||||||
<span class="sr-only">{{itemModel.text | translate}}</span>
|
<span class="sr-only">{{itemModel.text | translate}}</span>
|
||||||
</a>
|
</a>
|
||||||
<button *ngIf="section.model.disabled" class="btn btn-dark btn-sm" [dsDisabled]="true">
|
<button *ngIf="section.model.disabled" class="btn btn-dark btn-sm" [dsBtnDisabled]="true">
|
||||||
<i class="fas fa-{{section.icon}} fa-fw" aria-hidden="true"></i>
|
<i class="fas fa-{{section.icon}} fa-fw" aria-hidden="true"></i>
|
||||||
<span class="sr-only">{{itemModel.text | translate}}</span>
|
<span class="sr-only">{{itemModel.text | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
|
|
||||||
<div *ngIf="canActivate" class="dso-button-menu mb-1"
|
<div *ngIf="canActivate" class="dso-button-menu mb-1"
|
||||||
[ngbTooltip]="itemModel.text | translate">
|
[ngbTooltip]="itemModel.text | translate">
|
||||||
<button class="btn btn-dark btn-sm" [dsDisabled]="section.model.disabled"
|
<button class="btn btn-dark btn-sm" [dsBtnDisabled]="section.model.disabled"
|
||||||
(click)="activate($event)">
|
(click)="activate($event)">
|
||||||
<i class="fas fa-{{section.icon}} fa-fw" aria-hidden="true"></i>
|
<i class="fas fa-{{section.icon}} fa-fw" aria-hidden="true"></i>
|
||||||
<span class="sr-only">{{itemModel.text | translate}}</span>
|
<span class="sr-only">{{itemModel.text | translate}}</span>
|
||||||
|
@@ -29,7 +29,7 @@
|
|||||||
type="button"
|
type="button"
|
||||||
[attr.aria-labelledby]="'label_' + model.id"
|
[attr.aria-labelledby]="'label_' + model.id"
|
||||||
[class.disabled]="model.disabled"
|
[class.disabled]="model.disabled"
|
||||||
[dsDisabled]="model.disabled"
|
[dsBtnDisabled]="model.disabled"
|
||||||
(click)="datepicker.toggle()">
|
(click)="datepicker.toggle()">
|
||||||
|
|
||||||
<i *ngIf="model.toggleIcon" class="{{model.toggleIcon}}" aria-hidden="true"></i>
|
<i *ngIf="model.toggleIcon" class="{{model.toggleIcon}}" aria-hidden="true"></i>
|
||||||
|
@@ -52,7 +52,7 @@
|
|||||||
type="button"
|
type="button"
|
||||||
ngbTooltip="{{'form.search-help' | translate}}"
|
ngbTooltip="{{'form.search-help' | translate}}"
|
||||||
placement="top"
|
placement="top"
|
||||||
[dsDisabled]="model.readOnly || isSearchDisabled()"
|
[dsBtnDisabled]="model.readOnly || isSearchDisabled()"
|
||||||
[hidden]="isInputDisabled()"
|
[hidden]="isInputDisabled()"
|
||||||
(click)="sdRef.open(); search(); $event.stopPropagation();">{{'form.search' | translate}}
|
(click)="sdRef.open(); search(); $event.stopPropagation();">{{'form.search' | translate}}
|
||||||
</button>
|
</button>
|
||||||
@@ -60,7 +60,7 @@
|
|||||||
type="button"
|
type="button"
|
||||||
ngbTooltip="{{'form.clear-help' | translate}}"
|
ngbTooltip="{{'form.clear-help' | translate}}"
|
||||||
placement="top"
|
placement="top"
|
||||||
[dsDisabled]="model.readOnly"
|
[dsBtnDisabled]="model.readOnly"
|
||||||
(click)="remove()">{{'form.clear' | translate}}
|
(click)="remove()">{{'form.clear' | translate}}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -69,14 +69,14 @@
|
|||||||
type="button"
|
type="button"
|
||||||
ngbTooltip="{{'form.edit-help' | translate}}"
|
ngbTooltip="{{'form.edit-help' | translate}}"
|
||||||
placement="top"
|
placement="top"
|
||||||
[dsDisabled]="isEditDisabled()"
|
[dsBtnDisabled]="isEditDisabled()"
|
||||||
(click)="switchEditMode()">{{'form.edit' | translate}}
|
(click)="switchEditMode()">{{'form.edit' | translate}}
|
||||||
</button>
|
</button>
|
||||||
<button *ngIf="editMode" class="btn btn-secondary"
|
<button *ngIf="editMode" class="btn btn-secondary"
|
||||||
type="button"
|
type="button"
|
||||||
ngbTooltip="{{'form.save-help' | translate}}"
|
ngbTooltip="{{'form.save-help' | translate}}"
|
||||||
placement="top"
|
placement="top"
|
||||||
[dsDisabled]="!hasEmptyValue()"
|
[dsBtnDisabled]="!hasEmptyValue()"
|
||||||
(click)="saveChanges()">{{'form.save' | translate}}
|
(click)="saveChanges()">{{'form.save' | translate}}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -26,7 +26,7 @@ import {
|
|||||||
mockDynamicFormLayoutService,
|
mockDynamicFormLayoutService,
|
||||||
mockDynamicFormValidationService
|
mockDynamicFormValidationService
|
||||||
} from '../../../../../testing/dynamic-form-mock-services';
|
} from '../../../../../testing/dynamic-form-mock-services';
|
||||||
import {DisabledDirective} from '../../../../../disabled-directive';
|
import {BtnDisabledDirective} from '../../../../../btn-disabled.directive';
|
||||||
|
|
||||||
let LOOKUP_TEST_MODEL_CONFIG: DynamicLookupModelConfig = {
|
let LOOKUP_TEST_MODEL_CONFIG: DynamicLookupModelConfig = {
|
||||||
vocabularyOptions: {
|
vocabularyOptions: {
|
||||||
@@ -155,7 +155,7 @@ describe('Dynamic Lookup component', () => {
|
|||||||
TestComponent,
|
TestComponent,
|
||||||
AuthorityConfidenceStateDirective,
|
AuthorityConfidenceStateDirective,
|
||||||
ObjNgFor,
|
ObjNgFor,
|
||||||
DisabledDirective
|
BtnDisabledDirective
|
||||||
], // declare the test component
|
], // declare the test component
|
||||||
providers: [
|
providers: [
|
||||||
ChangeDetectorRef,
|
ChangeDetectorRef,
|
||||||
|
@@ -32,21 +32,21 @@
|
|||||||
|
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="btn btn-link"
|
class="btn btn-link"
|
||||||
[dsDisabled]="isMandatoryFieldEmpty()"
|
[dsBtnDisabled]="isMandatoryFieldEmpty()"
|
||||||
(click)="save()">
|
(click)="save()">
|
||||||
<i class="fas fa-save text-primary fa-2x"
|
<i class="fas fa-save text-primary fa-2x"
|
||||||
aria-hidden="true"></i>
|
aria-hidden="true"></i>
|
||||||
</button>
|
</button>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="btn btn-link"
|
class="btn btn-link"
|
||||||
[dsDisabled]="!editMode"
|
[dsBtnDisabled]="!editMode"
|
||||||
(click)="delete()">
|
(click)="delete()">
|
||||||
<i class="fas fa-trash text-danger fa-2x"
|
<i class="fas fa-trash text-danger fa-2x"
|
||||||
aria-hidden="true"></i>
|
aria-hidden="true"></i>
|
||||||
</button>
|
</button>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="btn btn-link"
|
class="btn btn-link"
|
||||||
[dsDisabled]="isMandatoryFieldEmpty()"
|
[dsBtnDisabled]="isMandatoryFieldEmpty()"
|
||||||
(click)="clear()">
|
(click)="clear()">
|
||||||
<i class="fas fa-undo fa-2x"
|
<i class="fas fa-undo fa-2x"
|
||||||
aria-hidden="true"></i>
|
aria-hidden="true"></i>
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title" id="modal-title">{{ ('submission.sections.describe.relationship-lookup.title.' + relationshipOptions.relationshipType) | translate }}</h4>
|
<h4 class="modal-title" id="modal-title">{{ ('submission.sections.describe.relationship-lookup.title.' + relationshipOptions.relationshipType) | translate }}</h4>
|
||||||
<button type="button" [dsDisabled]="isPending" class="close" aria-label="Close button" aria-describedby="modal-title"
|
<button type="button" [dsBtnDisabled]="isPending" class="close" aria-label="Close button" aria-describedby="modal-title"
|
||||||
(click)="close()">
|
(click)="close()">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -73,18 +73,18 @@
|
|||||||
<small>{{ ('submission.sections.describe.relationship-lookup.selected' | translate: {size: (selection$ | async)?.length || 0}) }}</small>
|
<small>{{ ('submission.sections.describe.relationship-lookup.selected' | translate: {size: (selection$ | async)?.length || 0}) }}</small>
|
||||||
<div class="d-flex float-right space-children-mr">
|
<div class="d-flex float-right space-children-mr">
|
||||||
<div class="close-button">
|
<div class="close-button">
|
||||||
<button type="button" [dsDisabled]="isPending" class="btn btn-outline-secondary" (click)="close()">
|
<button type="button" [dsBtnDisabled]="isPending" class="btn btn-outline-secondary" (click)="close()">
|
||||||
{{ ('submission.sections.describe.relationship-lookup.close' | translate) }}</button>
|
{{ ('submission.sections.describe.relationship-lookup.close' | translate) }}</button>
|
||||||
</div>
|
</div>
|
||||||
<ng-container *ngIf="isEditRelationship">
|
<ng-container *ngIf="isEditRelationship">
|
||||||
<button class="btn btn-danger discard"
|
<button class="btn btn-danger discard"
|
||||||
[dsDisabled]="(toAdd.length == 0 && toRemove.length == 0) || isPending"
|
[dsBtnDisabled]="(toAdd.length == 0 && toRemove.length == 0) || isPending"
|
||||||
(click)="discardEv()">
|
(click)="discardEv()">
|
||||||
<i class="fas fa-times"></i>
|
<i class="fas fa-times"></i>
|
||||||
<span class="d-none d-sm-inline"> {{"item.edit.metadata.discard-button" | translate}}</span>
|
<span class="d-none d-sm-inline"> {{"item.edit.metadata.discard-button" | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-primary submit"
|
<button class="btn btn-primary submit"
|
||||||
[dsDisabled]="(toAdd.length == 0 && toRemove.length == 0) || isPending"
|
[dsBtnDisabled]="(toAdd.length == 0 && toRemove.length == 0) || isPending"
|
||||||
(click)="submitEv()">
|
(click)="submitEv()">
|
||||||
<span *ngIf="isPending" class="spinner-border spinner-border-sm mr-1" role="status"
|
<span *ngIf="isPending" class="spinner-border spinner-border-sm mr-1" role="status"
|
||||||
aria-hidden="true"></span>
|
aria-hidden="true"></span>
|
||||||
|
@@ -24,7 +24,7 @@ import { WorkspaceItem } from '../../../../../core/submission/models/workspaceit
|
|||||||
import { Collection } from '../../../../../core/shared/collection.model';
|
import { Collection } from '../../../../../core/shared/collection.model';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { XSRFService } from '../../../../../core/xsrf/xsrf.service';
|
import { XSRFService } from '../../../../../core/xsrf/xsrf.service';
|
||||||
import {DisabledDirective} from '../../../../disabled-directive';
|
import {BtnDisabledDirective} from '../../../../btn-disabled.directive';
|
||||||
|
|
||||||
describe('DsDynamicLookupRelationModalComponent', () => {
|
describe('DsDynamicLookupRelationModalComponent', () => {
|
||||||
let component: DsDynamicLookupRelationModalComponent;
|
let component: DsDynamicLookupRelationModalComponent;
|
||||||
@@ -104,7 +104,7 @@ describe('DsDynamicLookupRelationModalComponent', () => {
|
|||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
init();
|
init();
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
declarations: [DsDynamicLookupRelationModalComponent, DisabledDirective],
|
declarations: [DsDynamicLookupRelationModalComponent, BtnDisabledDirective],
|
||||||
imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NgbModule],
|
imports: [TranslateModule.forRoot(), RouterTestingModule.withRoutes([]), NgbModule],
|
||||||
providers: [
|
providers: [
|
||||||
{
|
{
|
||||||
|
@@ -49,6 +49,6 @@
|
|||||||
<button type="button" class="btn btn-outline-secondary" (click)="close()">{{ (labelPrefix + 'cancel' | translate) }}</button>
|
<button type="button" class="btn btn-outline-secondary" (click)="close()">{{ (labelPrefix + 'cancel' | translate) }}</button>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<button type="button" class="btn btn-primary" [dsDisabled]="selectedImportType === importType.None" (click)="import()">{{ (labelPrefix + 'import' | translate) }}</button>
|
<button type="button" class="btn btn-primary" [dsBtnDisabled]="selectedImportType === importType.None" (click)="import()">{{ (labelPrefix + 'import' | translate) }}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -41,7 +41,7 @@
|
|||||||
title="{{'form.discard' | translate}}"
|
title="{{'form.discard' | translate}}"
|
||||||
attr.aria-label="{{'form.discard' | translate}}"
|
attr.aria-label="{{'form.discard' | translate}}"
|
||||||
(click)="removeItem($event, context, index)"
|
(click)="removeItem($event, context, index)"
|
||||||
[dsDisabled]="group.context.groups.length === 1 || isItemReadOnly(context, index)">
|
[dsBtnDisabled]="group.context.groups.length === 1 || isItemReadOnly(context, index)">
|
||||||
<span>{{'form.discard' | translate}}</span>
|
<span>{{'form.discard' | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -62,7 +62,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<ng-content select="[between]"></ng-content>
|
<ng-content select="[between]"></ng-content>
|
||||||
<button *ngIf="displaySubmit" type="submit" class="btn btn-primary" (click)="onSubmit()"
|
<button *ngIf="displaySubmit" type="submit" class="btn btn-primary" (click)="onSubmit()"
|
||||||
[dsDisabled]="!(isValid() | async)">
|
[dsBtnDisabled]="!(isValid() | async)">
|
||||||
<i class="fas fa-save" aria-hidden="true"></i> {{submitLabel | translate}}
|
<i class="fas fa-save" aria-hidden="true"></i> {{submitLabel | translate}}
|
||||||
</button>
|
</button>
|
||||||
<ng-content select="[after]"></ng-content>
|
<ng-content select="[after]"></ng-content>
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
class="btn btn-link-focus"
|
class="btn btn-link-focus"
|
||||||
type="button"
|
type="button"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
[dsDisabled]="disabled"
|
[dsBtnDisabled]="disabled"
|
||||||
(click)="toggleUp()">
|
(click)="toggleUp()">
|
||||||
<span class="chevron"></span>
|
<span class="chevron"></span>
|
||||||
<span class="sr-only">{{'form.number-picker.increment' | translate: {field: name} }}</span>
|
<span class="sr-only">{{'form.number-picker.increment' | translate: {field: name} }}</span>
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
class="btn btn-link-focus"
|
class="btn btn-link-focus"
|
||||||
type="button"
|
type="button"
|
||||||
tabindex="0"
|
tabindex="0"
|
||||||
[dsDisabled]="disabled"
|
[dsBtnDisabled]="disabled"
|
||||||
(click)="toggleDown()">
|
(click)="toggleDown()">
|
||||||
<span class="chevron bottom"></span>
|
<span class="chevron bottom"></span>
|
||||||
<span class="sr-only">{{'form.number-picker.decrement' | translate: {field: name} }}</span>
|
<span class="sr-only">{{'form.number-picker.decrement' | translate: {field: name} }}</span>
|
||||||
|
@@ -44,7 +44,7 @@ describe('NumberPickerComponent test suite', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
html = `
|
html = `
|
||||||
<ds-number-picker
|
<ds-number-picker
|
||||||
[dsDisabled]="disabled"
|
[disabled]="disabled"
|
||||||
[min]="min"
|
[min]="min"
|
||||||
[max]="max"
|
[max]="max"
|
||||||
[id]="'ds_test_field'"
|
[id]="'ds_test_field'"
|
||||||
|
@@ -5,13 +5,13 @@
|
|||||||
<input type="text" class="form-control" [(ngModel)]="searchText" (keyup.enter)="search()"
|
<input type="text" class="form-control" [(ngModel)]="searchText" (keyup.enter)="search()"
|
||||||
[placeholder]="'vocabulary-treeview.search.form.search-placeholder' | translate">
|
[placeholder]="'vocabulary-treeview.search.form.search-placeholder' | translate">
|
||||||
<div class="input-group-append" id="button-addon4">
|
<div class="input-group-append" id="button-addon4">
|
||||||
<button class="btn btn-outline-primary" type="button" (click)="search()" [dsDisabled]="!isSearchEnabled()">
|
<button class="btn btn-outline-primary" type="button" (click)="search()" [dsBtnDisabled]="!isSearchEnabled()">
|
||||||
{{'vocabulary-treeview.search.form.search' | translate}}
|
{{'vocabulary-treeview.search.form.search' | translate}}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-outline-secondary" type="button" (click)="reset()">
|
<button class="btn btn-outline-secondary" type="button" (click)="reset()">
|
||||||
{{'vocabulary-treeview.search.form.reset' | translate}}
|
{{'vocabulary-treeview.search.form.reset' | translate}}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-outline-primary" type="button" (click)="add()" [dsDisabled]="this.vocabularyOptions.closed">
|
<button class="btn btn-outline-primary" type="button" (click)="add()" [dsBtnDisabled]="this.vocabularyOptions.closed">
|
||||||
{{'vocabulary-treeview.search.form.add' | translate}}
|
{{'vocabulary-treeview.search.form.add' | translate}}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<button *ngIf="!multiSelect" class="btn btn-outline-link btn-sm text-left"
|
<button *ngIf="!multiSelect" class="btn btn-outline-link btn-sm text-left"
|
||||||
[class.text-success]="node.isSelected"
|
[class.text-success]="node.isSelected"
|
||||||
[dsDisabled]="!node.item?.selectable"
|
[dsBtnDisabled]="!node.item?.selectable"
|
||||||
[ngbTooltip]="node.item?.otherInformation?.note"
|
[ngbTooltip]="node.item?.otherInformation?.note"
|
||||||
[openDelay]="500"
|
[openDelay]="500"
|
||||||
container="body"
|
container="body"
|
||||||
@@ -77,7 +77,7 @@
|
|||||||
</label>
|
</label>
|
||||||
<button *ngIf="!multiSelect" class="btn btn-outline-link btn-sm text-left"
|
<button *ngIf="!multiSelect" class="btn btn-outline-link btn-sm text-left"
|
||||||
[class.text-success]="node.isSelected"
|
[class.text-success]="node.isSelected"
|
||||||
[dsDisabled]="!node.item?.selectable"
|
[dsBtnDisabled]="!node.item?.selectable"
|
||||||
[ngbTooltip]="node.item?.otherInformation?.note"
|
[ngbTooltip]="node.item?.otherInformation?.note"
|
||||||
[openDelay]="500"
|
[openDelay]="500"
|
||||||
container="body"
|
container="body"
|
||||||
|
@@ -24,7 +24,7 @@
|
|||||||
@fadeOut>{{ (message | async) | translate }}</div>
|
@fadeOut>{{ (message | async) | translate }}</div>
|
||||||
|
|
||||||
<button class="btn btn-lg btn-primary btn-block mt-3" type="submit" [attr.data-test]="'login-button' | dsBrowserOnly"
|
<button class="btn btn-lg btn-primary btn-block mt-3" type="submit" [attr.data-test]="'login-button' | dsBrowserOnly"
|
||||||
[dsDisabled]="!form.valid"><i class="fas fa-sign-in-alt"></i> {{"login.form.submit" | translate}}</button>
|
[dsBtnDisabled]="!form.valid"><i class="fas fa-sign-in-alt"></i> {{"login.form.submit" | translate}}</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<button type="button"
|
<button type="button"
|
||||||
[className]="'btn btn-success'"
|
[className]="'btn btn-success'"
|
||||||
ngbTooltip="{{'submission.workflow.tasks.claimed.approve_help' | translate}}"
|
ngbTooltip="{{'submission.workflow.tasks.claimed.approve_help' | translate}}"
|
||||||
[dsDisabled]="processing$ | async"
|
[dsBtnDisabled]="processing$ | async"
|
||||||
(click)="submitTask()">
|
(click)="submitTask()">
|
||||||
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}</span>
|
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}</span>
|
||||||
<span *ngIf="!(processing$ | async)"><i class="fa fa-thumbs-up"></i> {{'submission.workflow.tasks.claimed.approve' | translate}}</span>
|
<span *ngIf="!(processing$ | async)"><i class="fa fa-thumbs-up"></i> {{'submission.workflow.tasks.claimed.approve' | translate}}</span>
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<button (click)="submitTask()"
|
<button (click)="submitTask()"
|
||||||
[dsDisabled]="processing$ | async"
|
[dsBtnDisabled]="processing$ | async"
|
||||||
class="declineTaskAction btn btn-warning"
|
class="declineTaskAction btn btn-warning"
|
||||||
ngbTooltip="{{'submission.workflow.tasks.claimed.decline_help' | translate}}"
|
ngbTooltip="{{'submission.workflow.tasks.claimed.decline_help' | translate}}"
|
||||||
type="button">
|
type="button">
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<ng-template #rejectTipContent><p [innerHTML]="'submission.workflow.tasks.claimed.reject_help' | translate"></p></ng-template>
|
<ng-template #rejectTipContent><p [innerHTML]="'submission.workflow.tasks.claimed.reject_help' | translate"></p></ng-template>
|
||||||
<button [className]="'btn btn-danger'"
|
<button [className]="'btn btn-danger'"
|
||||||
[ngbTooltip]="rejectTipContent"
|
[ngbTooltip]="rejectTipContent"
|
||||||
[dsDisabled]="processing$ | async"
|
[dsBtnDisabled]="processing$ | async"
|
||||||
(click)="openRejectModal(rejectModal)" >
|
(click)="openRejectModal(rejectModal)" >
|
||||||
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}</span>
|
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}</span>
|
||||||
<span *ngIf="!(processing$ | async)"><i class="fa fa-trash"></i> {{'submission.workflow.tasks.claimed.reject.submit' | translate}}</span>
|
<span *ngIf="!(processing$ | async)"><i class="fa fa-trash"></i> {{'submission.workflow.tasks.claimed.reject.submit' | translate}}</span>
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
placeholder="{{'submission.workflow.tasks.claimed.reject.reason.placeholder' | translate}}"></textarea>
|
placeholder="{{'submission.workflow.tasks.claimed.reject.reason.placeholder' | translate}}"></textarea>
|
||||||
<button id="btn-chat"
|
<button id="btn-chat"
|
||||||
class="btn btn-danger btn-lg btn-block mt-3"
|
class="btn btn-danger btn-lg btn-block mt-3"
|
||||||
[dsDisabled]="!rejectForm.valid || (processing$ | async)"
|
[dsBtnDisabled]="!rejectForm.valid || (processing$ | async)"
|
||||||
type="submit">
|
type="submit">
|
||||||
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}</span>
|
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}</span>
|
||||||
<span *ngIf="!(processing$ | async)">{{'submission.workflow.tasks.claimed.reject.reason.submit' | translate}}</span>
|
<span *ngIf="!(processing$ | async)">{{'submission.workflow.tasks.claimed.reject.reason.submit' | translate}}</span>
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<button type="button"
|
<button type="button"
|
||||||
[className]="'btn btn-secondary'"
|
[className]="'btn btn-secondary'"
|
||||||
ngbTooltip="{{'submission.workflow.tasks.claimed.return_help' | translate}}"
|
ngbTooltip="{{'submission.workflow.tasks.claimed.return_help' | translate}}"
|
||||||
[dsDisabled]="processing$ | async"
|
[dsBtnDisabled]="processing$ | async"
|
||||||
(click)="submitTask()">
|
(click)="submitTask()">
|
||||||
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}</span>
|
<span *ngIf="processing$ | async"><i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}</span>
|
||||||
<span *ngIf="!(processing$ | async)"><i class="fa fa-undo"></i> {{'submission.workflow.tasks.claimed.return' | translate}}</span>
|
<span *ngIf="!(processing$ | async)"><i class="fa fa-undo"></i> {{'submission.workflow.tasks.claimed.return' | translate}}</span>
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
<button type="button" class="btn btn-info mt-1 mb-3"
|
<button type="button" class="btn btn-info mt-1 mb-3"
|
||||||
ngbTooltip="{{'submission.workflow.tasks.pool.claim_help' | translate}}" [dsDisabled]="(processing$ | async)"
|
ngbTooltip="{{'submission.workflow.tasks.pool.claim_help' | translate}}" [dsBtnDisabled]="(processing$ | async)"
|
||||||
(click)="claim()">
|
(click)="claim()">
|
||||||
<span *ngIf="(processing$ | async)"><i class='fas fa-circle-notch fa-spin'></i>
|
<span *ngIf="(processing$ | async)"><i class='fas fa-circle-notch fa-spin'></i>
|
||||||
{{'submission.workflow.tasks.generic.processing' | translate}}</span>
|
{{'submission.workflow.tasks.generic.processing' | translate}}</span>
|
||||||
|
@@ -34,7 +34,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<button class="btn collection-confirm"
|
<button class="btn collection-confirm"
|
||||||
[ngClass]="{'btn-danger': dangerConfirm, 'btn-primary': !dangerConfirm}"
|
[ngClass]="{'btn-danger': dangerConfirm, 'btn-primary': !dangerConfirm}"
|
||||||
[dsDisabled]="selectedIds?.length === 0"
|
[dsBtnDisabled]="selectedIds?.length === 0"
|
||||||
(click)="confirmSelected()">
|
(click)="confirmSelected()">
|
||||||
<i class="fas fa-trash"></i> {{confirmButton | translate}}
|
<i class="fas fa-trash"></i> {{confirmButton | translate}}
|
||||||
</button>
|
</button>
|
||||||
|
@@ -42,7 +42,7 @@
|
|||||||
<button class="btn btn-outline-secondary item-cancel float-left" (click)="onCancel()">{{cancelButton | translate}}</button>
|
<button class="btn btn-outline-secondary item-cancel float-left" (click)="onCancel()">{{cancelButton | translate}}</button>
|
||||||
<button class="btn item-confirm float-right"
|
<button class="btn item-confirm float-right"
|
||||||
[ngClass]="{'btn-danger': dangerConfirm, 'btn-primary': !dangerConfirm}"
|
[ngClass]="{'btn-danger': dangerConfirm, 'btn-primary': !dangerConfirm}"
|
||||||
[dsDisabled]="selectedIds?.length === 0"
|
[dsBtnDisabled]="selectedIds?.length === 0"
|
||||||
(click)="confirmSelected()">
|
(click)="confirmSelected()">
|
||||||
{{confirmButton | translate}}
|
{{confirmButton | translate}}
|
||||||
</button>
|
</button>
|
||||||
|
@@ -24,7 +24,7 @@ import { LinkHeadService } from '../../../core/services/link-head.service';
|
|||||||
import { GroupDataService } from '../../../core/eperson/group-data.service';
|
import { GroupDataService } from '../../../core/eperson/group-data.service';
|
||||||
import { SearchConfigurationServiceStub } from '../../testing/search-configuration-service.stub';
|
import { SearchConfigurationServiceStub } from '../../testing/search-configuration-service.stub';
|
||||||
import { ConfigurationProperty } from '../../../core/shared/configuration-property.model';
|
import { ConfigurationProperty } from '../../../core/shared/configuration-property.model';
|
||||||
import {DisabledDirective} from '../../disabled-directive';
|
import {BtnDisabledDirective} from '../../btn-disabled.directive';
|
||||||
|
|
||||||
describe('ItemSelectComponent', () => {
|
describe('ItemSelectComponent', () => {
|
||||||
let comp: ItemSelectComponent;
|
let comp: ItemSelectComponent;
|
||||||
@@ -99,7 +99,7 @@ describe('ItemSelectComponent', () => {
|
|||||||
beforeEach(waitForAsync(() => {
|
beforeEach(waitForAsync(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot(), SharedModule, RouterTestingModule.withRoutes([])],
|
imports: [TranslateModule.forRoot(), SharedModule, RouterTestingModule.withRoutes([])],
|
||||||
declarations: [DisabledDirective],
|
declarations: [BtnDisabledDirective],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: ObjectSelectService, useValue: new ObjectSelectServiceStub([mockItemList[1].id]) },
|
{ provide: ObjectSelectService, useValue: new ObjectSelectServiceStub([mockItemList[1].id]) },
|
||||||
{ provide: HostWindowService, useValue: new HostWindowServiceStub(0) },
|
{ provide: HostWindowService, useValue: new HostWindowServiceStub(0) },
|
||||||
|
@@ -55,12 +55,12 @@
|
|||||||
<div *ngIf="!showPaginator" class="d-flex justify-content-between">
|
<div *ngIf="!showPaginator" class="d-flex justify-content-between">
|
||||||
<button id="nav-prev" type="button" class="btn btn-outline-primary float-left"
|
<button id="nav-prev" type="button" class="btn btn-outline-primary float-left"
|
||||||
(click)="goPrev()"
|
(click)="goPrev()"
|
||||||
[dsDisabled]="(objects?.payload?.currentPage <= 1) && (paginationOptions?.currentPage <= 1)">
|
[dsBtnDisabled]="(objects?.payload?.currentPage <= 1) && (paginationOptions?.currentPage <= 1)">
|
||||||
<i class="fas fa-angle-left"></i> {{'pagination.previous.button' |translate}}
|
<i class="fas fa-angle-left"></i> {{'pagination.previous.button' |translate}}
|
||||||
</button>
|
</button>
|
||||||
<button id="nav-next" type="button" class="btn btn-outline-primary float-right"
|
<button id="nav-next" type="button" class="btn btn-outline-primary float-right"
|
||||||
(click)="goNext()"
|
(click)="goNext()"
|
||||||
[dsDisabled]="(objects?.payload?.currentPage >= objects?.payload?.totalPages) || (paginationOptions?.currentPage >= objects?.payload?.totalPages)">
|
[dsBtnDisabled]="(objects?.payload?.currentPage >= objects?.payload?.totalPages) || (paginationOptions?.currentPage >= objects?.payload?.totalPages)">
|
||||||
<span [ngbTooltip]="objects?.payload?.currentPage >= objects?.payload?.totalPages ? ('pagination.next.button.disabled.tooltip' |translate) : null">
|
<span [ngbTooltip]="objects?.payload?.currentPage >= objects?.payload?.totalPages ? ('pagination.next.button.disabled.tooltip' |translate) : null">
|
||||||
<i class="fas fa-angle-right"></i> {{'pagination.next.button' |translate}}
|
<i class="fas fa-angle-right"></i> {{'pagination.next.button' |translate}}
|
||||||
</span>
|
</span>
|
||||||
|
@@ -31,11 +31,11 @@
|
|||||||
<div class="col text-right">
|
<div class="col text-right">
|
||||||
<button type="reset"
|
<button type="reset"
|
||||||
class="btn btn-default"
|
class="btn btn-default"
|
||||||
[dsDisabled]="(isProcessing | async)"
|
[dsBtnDisabled]="(isProcessing | async)"
|
||||||
(click)="onReset()">{{'form.cancel' | translate}}</button>
|
(click)="onReset()">{{'form.cancel' | translate}}</button>
|
||||||
<button type="button"
|
<button type="button"
|
||||||
class="btn btn-primary"
|
class="btn btn-primary"
|
||||||
[dsDisabled]="!(isFormValid() | async) || (isProcessing | async)"
|
[dsBtnDisabled]="!(isFormValid() | async) || (isProcessing | async)"
|
||||||
(click)="onSubmit()">
|
(click)="onSubmit()">
|
||||||
<span *ngIf="(isProcessing | async)">
|
<span *ngIf="(isProcessing | async)">
|
||||||
<i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}
|
<i class='fas fa-circle-notch fa-spin'></i> {{'submission.workflow.tasks.generic.processing' | translate}}
|
||||||
|
@@ -39,7 +39,7 @@ import { PaginationServiceStub } from '../../testing/pagination-service.stub';
|
|||||||
import { PaginationService } from '../../../core/pagination/pagination.service';
|
import { PaginationService } from '../../../core/pagination/pagination.service';
|
||||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
import { StoreMock } from '../../testing/store.mock';
|
import { StoreMock } from '../../testing/store.mock';
|
||||||
import {DisabledDirective} from '../../disabled-directive';
|
import {BtnDisabledDirective} from '../../btn-disabled.directive';
|
||||||
|
|
||||||
export const mockResourcePolicyFormData = {
|
export const mockResourcePolicyFormData = {
|
||||||
name: [
|
name: [
|
||||||
@@ -191,7 +191,7 @@ describe('ResourcePolicyFormComponent test suite', () => {
|
|||||||
EpersonGroupListComponent,
|
EpersonGroupListComponent,
|
||||||
ResourcePolicyFormComponent,
|
ResourcePolicyFormComponent,
|
||||||
TestComponent,
|
TestComponent,
|
||||||
DisabledDirective
|
BtnDisabledDirective
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: ActivatedRoute, useValue: activatedRouteStub },
|
{ provide: ActivatedRoute, useValue: activatedRouteStub },
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<div class="space-children-mr flex-shrink-0">
|
<div class="space-children-mr flex-shrink-0">
|
||||||
<button class="btn btn-danger p-1"
|
<button class="btn btn-danger p-1"
|
||||||
[dsDisabled]="(!(canDelete() | async)) || (isProcessingDelete() | async)"
|
[dsBtnDisabled]="(!(canDelete() | async)) || (isProcessingDelete() | async)"
|
||||||
[title]="'resource-policies.delete.btn.title' | translate"
|
[title]="'resource-policies.delete.btn.title' | translate"
|
||||||
(click)="deleteSelectedResourcePolicies()">
|
(click)="deleteSelectedResourcePolicies()">
|
||||||
<span *ngIf="(isProcessingDelete() | async)">
|
<span *ngIf="(isProcessingDelete() | async)">
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-success p-1"
|
<button class="btn btn-success p-1"
|
||||||
[dsDisabled]="(isProcessingDelete() | async)"
|
[dsBtnDisabled]="(isProcessingDelete() | async)"
|
||||||
[title]="'resource-policies.add.for.' + resourceType | translate"
|
[title]="'resource-policies.add.for.' + resourceType | translate"
|
||||||
(click)="redirectToResourcePolicyCreatePage()">
|
(click)="redirectToResourcePolicyCreatePage()">
|
||||||
<i class='fas fa-plus' aria-hidden="true"></i>
|
<i class='fas fa-plus' aria-hidden="true"></i>
|
||||||
|
@@ -284,7 +284,7 @@ import { BitstreamListItemComponent } from './object-list/bitstream-list-item/bi
|
|||||||
import { NgxPaginationModule } from 'ngx-pagination';
|
import { NgxPaginationModule } from 'ngx-pagination';
|
||||||
import { ThemedLangSwitchComponent } from './lang-switch/themed-lang-switch.component';
|
import { ThemedLangSwitchComponent } from './lang-switch/themed-lang-switch.component';
|
||||||
import {ThemedUserMenuComponent} from './auth-nav-menu/user-menu/themed-user-menu.component';
|
import {ThemedUserMenuComponent} from './auth-nav-menu/user-menu/themed-user-menu.component';
|
||||||
import {DisabledDirective} from './disabled-directive';
|
import {BtnDisabledDirective} from './btn-disabled.directive';
|
||||||
|
|
||||||
const MODULES = [
|
const MODULES = [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
@@ -494,7 +494,7 @@ const DIRECTIVES = [
|
|||||||
MetadataFieldValidator,
|
MetadataFieldValidator,
|
||||||
HoverClassDirective,
|
HoverClassDirective,
|
||||||
ContextHelpDirective,
|
ContextHelpDirective,
|
||||||
DisabledDirective,
|
BtnDisabledDirective,
|
||||||
];
|
];
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
@@ -34,7 +34,7 @@
|
|||||||
(click)="activeModal.close()">
|
(click)="activeModal.close()">
|
||||||
{{'subscriptions.modal.close' | translate}}
|
{{'subscriptions.modal.close' | translate}}
|
||||||
</button>
|
</button>
|
||||||
<button type="submit" class="btn btn-success" [dsDisabled]="(processing$ | async) || !isValid">
|
<button type="submit" class="btn btn-success" [dsBtnDisabled]="(processing$ | async) || !isValid">
|
||||||
<span *ngIf="(processing$ | async)">
|
<span *ngIf="(processing$ | async)">
|
||||||
<i class='fas fa-circle-notch fa-spin'></i> {{'subscriptions.modal.new-subscription-form.processing' | translate}}
|
<i class='fas fa-circle-notch fa-spin'></i> {{'subscriptions.modal.new-subscription-form.processing' | translate}}
|
||||||
</span>
|
</span>
|
||||||
|
@@ -21,7 +21,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td class="subscription-actions">
|
<td class="subscription-actions">
|
||||||
<div class="btn-group edit-field">
|
<div class="btn-group edit-field">
|
||||||
<button (click)="$event.preventDefault();openSubscriptionModal();" [dsDisabled]="!dso"
|
<button (click)="$event.preventDefault();openSubscriptionModal();" [dsBtnDisabled]="!dso"
|
||||||
[title]="'subscriptions.table.edit' | translate"
|
[title]="'subscriptions.table.edit' | translate"
|
||||||
class="btn btn-outline-primary btn-sm access-control-editEPersonButton">
|
class="btn btn-outline-primary btn-sm access-control-editEPersonButton">
|
||||||
<i class="fas fa-edit fa-fw"></i>
|
<i class="fas fa-edit fa-fw"></i>
|
||||||
|
@@ -35,7 +35,7 @@
|
|||||||
<span *ngIf="!uploader.options.disableMultipart">{{'uploader.queue-length' | translate}}: {{ uploader?.queue?.length }} | </span>{{ uploader?.queue[0]?.file.name }}
|
<span *ngIf="!uploader.options.disableMultipart">{{'uploader.queue-length' | translate}}: {{ uploader?.queue?.length }} | </span>{{ uploader?.queue[0]?.file.name }}
|
||||||
</span>
|
</span>
|
||||||
<div class="btn-group btn-group-sm float-right" role="group">
|
<div class="btn-group btn-group-sm float-right" role="group">
|
||||||
<button type="button" class="btn btn-danger" title="{{'uploader.delete.btn-title' | translate}}" (click)="uploader.clearQueue()" [dsDisabled]="!uploader.queue.length">
|
<button type="button" class="btn btn-danger" title="{{'uploader.delete.btn-title' | translate}}" (click)="uploader.clearQueue()" [dsBtnDisabled]="!uploader.queue.length">
|
||||||
<i class="fas fa-trash" aria-hidden="true"></i>
|
<i class="fas fa-trash" aria-hidden="true"></i>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -25,7 +25,7 @@
|
|||||||
class="btn btn-outline-primary"
|
class="btn btn-outline-primary"
|
||||||
(blur)="onClose()"
|
(blur)="onClose()"
|
||||||
(click)="onClose()"
|
(click)="onClose()"
|
||||||
[dsDisabled]="(processingChange$ | async) || collectionModifiable == false || isReadonly"
|
[dsBtnDisabled]="(processingChange$ | async) || collectionModifiable == false || isReadonly"
|
||||||
ngbDropdownToggle>
|
ngbDropdownToggle>
|
||||||
<span *ngIf="(processingChange$ | async)"><i class='fas fa-circle-notch fa-spin'></i></span>
|
<span *ngIf="(processingChange$ | async)"><i class='fas fa-circle-notch fa-spin'></i></span>
|
||||||
<span *ngIf="!(processingChange$ | async)">{{ selectedCollectionName$ | async }}</span>
|
<span *ngIf="!(processingChange$ | async)">{{ selectedCollectionName$ | async }}</span>
|
||||||
|
@@ -25,7 +25,7 @@ import { Collection } from '../../../core/shared/collection.model';
|
|||||||
import { createSuccessfulRemoteDataObject$ } from '../../../shared/remote-data.utils';
|
import { createSuccessfulRemoteDataObject$ } from '../../../shared/remote-data.utils';
|
||||||
import { DSONameService } from '../../../core/breadcrumbs/dso-name.service';
|
import { DSONameService } from '../../../core/breadcrumbs/dso-name.service';
|
||||||
import { DSONameServiceMock } from '../../../shared/mocks/dso-name.service.mock';
|
import { DSONameServiceMock } from '../../../shared/mocks/dso-name.service.mock';
|
||||||
import {DisabledDirective} from '../../../shared/disabled-directive';
|
import {BtnDisabledDirective} from '../../../shared/btn-disabled.directive';
|
||||||
|
|
||||||
describe('SubmissionFormCollectionComponent Component', () => {
|
describe('SubmissionFormCollectionComponent Component', () => {
|
||||||
|
|
||||||
@@ -137,7 +137,7 @@ describe('SubmissionFormCollectionComponent Component', () => {
|
|||||||
declarations: [
|
declarations: [
|
||||||
SubmissionFormCollectionComponent,
|
SubmissionFormCollectionComponent,
|
||||||
TestComponent,
|
TestComponent,
|
||||||
DisabledDirective
|
BtnDisabledDirective
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: DSONameService, useValue: new DSONameServiceMock() },
|
{ provide: DSONameService, useValue: new DSONameServiceMock() },
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
id="discard"
|
id="discard"
|
||||||
[attr.data-test]="'discard' | dsBrowserOnly"
|
[attr.data-test]="'discard' | dsBrowserOnly"
|
||||||
class="btn btn-danger"
|
class="btn btn-danger"
|
||||||
[dsDisabled]="(processingSaveStatus | async) || (processingDepositStatus | async)"
|
[dsBtnDisabled]="(processingSaveStatus | async) || (processingDepositStatus | async)"
|
||||||
(click)="$event.preventDefault();confirmDiscard(content)">
|
(click)="$event.preventDefault();confirmDiscard(content)">
|
||||||
<i class="fas fa-trash"></i> {{'submission.general.discard.submit' | translate}}
|
<i class="fas fa-trash"></i> {{'submission.general.discard.submit' | translate}}
|
||||||
</button>
|
</button>
|
||||||
@@ -28,7 +28,7 @@
|
|||||||
class="btn btn-secondary"
|
class="btn btn-secondary"
|
||||||
id="save"
|
id="save"
|
||||||
[attr.data-test]="'save' | dsBrowserOnly"
|
[attr.data-test]="'save' | dsBrowserOnly"
|
||||||
[dsDisabled]="(processingSaveStatus | async) || !(hasUnsavedModification | async)"
|
[dsBtnDisabled]="(processingSaveStatus | async) || !(hasUnsavedModification | async)"
|
||||||
(click)="save($event)">
|
(click)="save($event)">
|
||||||
<span><i class="fas fa-save"></i> {{'submission.general.save' | translate}}</span>
|
<span><i class="fas fa-save"></i> {{'submission.general.save' | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
class="btn"
|
class="btn"
|
||||||
id="saveForLater"
|
id="saveForLater"
|
||||||
[attr.data-test]="'save-for-later' | dsBrowserOnly"
|
[attr.data-test]="'save-for-later' | dsBrowserOnly"
|
||||||
[dsDisabled]="(processingSaveStatus | async) || (processingDepositStatus | async)"
|
[dsBtnDisabled]="(processingSaveStatus | async) || (processingDepositStatus | async)"
|
||||||
(click)="saveLater($event)">
|
(click)="saveLater($event)">
|
||||||
<span><i class="fas fa-save"></i> {{'submission.general.save-later' | translate}}</span>
|
<span><i class="fas fa-save"></i> {{'submission.general.save-later' | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
id="deposit"
|
id="deposit"
|
||||||
[attr.data-test]="'deposit' | dsBrowserOnly"
|
[attr.data-test]="'deposit' | dsBrowserOnly"
|
||||||
class="btn btn-success"
|
class="btn btn-success"
|
||||||
[dsDisabled]="(processingSaveStatus | async) || (processingDepositStatus | async)"
|
[dsBtnDisabled]="(processingSaveStatus | async) || (processingDepositStatus | async)"
|
||||||
(click)="deposit($event)">
|
(click)="deposit($event)">
|
||||||
<span><i class="fas fa-plus"></i> {{'submission.general.deposit' | translate}}</span>
|
<span><i class="fas fa-plus"></i> {{'submission.general.deposit' | translate}}</span>
|
||||||
</button>
|
</button>
|
||||||
|
@@ -16,7 +16,7 @@ import { SubmissionFormFooterComponent } from './submission-form-footer.componen
|
|||||||
import { SubmissionRestService } from '../../../core/submission/submission-rest.service';
|
import { SubmissionRestService } from '../../../core/submission/submission-rest.service';
|
||||||
import { createTestComponent } from '../../../shared/testing/utils.test';
|
import { createTestComponent } from '../../../shared/testing/utils.test';
|
||||||
import { BrowserOnlyMockPipe } from '../../../shared/testing/browser-only-mock.pipe';
|
import { BrowserOnlyMockPipe } from '../../../shared/testing/browser-only-mock.pipe';
|
||||||
import {DisabledDirective} from '../../../shared/disabled-directive';
|
import {BtnDisabledDirective} from '../../../shared/btn-disabled.directive';
|
||||||
|
|
||||||
const submissionServiceStub: SubmissionServiceStub = new SubmissionServiceStub();
|
const submissionServiceStub: SubmissionServiceStub = new SubmissionServiceStub();
|
||||||
|
|
||||||
@@ -40,7 +40,7 @@ describe('SubmissionFormFooterComponent', () => {
|
|||||||
SubmissionFormFooterComponent,
|
SubmissionFormFooterComponent,
|
||||||
TestComponent,
|
TestComponent,
|
||||||
BrowserOnlyMockPipe,
|
BrowserOnlyMockPipe,
|
||||||
DisabledDirective
|
BtnDisabledDirective
|
||||||
],
|
],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: SubmissionService, useValue: submissionServiceStub },
|
{ provide: SubmissionService, useValue: submissionServiceStub },
|
||||||
|
@@ -23,6 +23,6 @@
|
|||||||
<div ngbDropdownItem class="scrollable-dropdown-loading text-center" *ngIf="sourceListLoading"><p>{{'submission.import-external.source.loading' | translate}}</p></div>
|
<div ngbDropdownItem class="scrollable-dropdown-loading text-center" *ngIf="sourceListLoading"><p>{{'submission.import-external.source.loading' | translate}}</p></div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<button type="button" class="btn btn-primary" [title]="(searchString === '')?('submission.import-external.search.button.hint' | translate):''" [dsDisabled]="searchString === ''" (click)="search()">{{'submission.import-external.search.button' | translate}}</button>
|
<button type="button" class="btn btn-primary" [title]="(searchString === '')?('submission.import-external.search.button.hint' | translate):''" [dsBtnDisabled]="searchString === ''" (click)="search()">{{'submission.import-external.search.button' | translate}}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<h4 class="modal-title">{{'submission.sections.upload.edit.title' | translate}}</h4>
|
<h4 class="modal-title">{{'submission.sections.upload.edit.title' | translate}}</h4>
|
||||||
<button type="button" class="close" (click)="onModalClose()" aria-label="Close" [dsDisabled]="isSaving">
|
<button type="button" class="close" (click)="onModalClose()" aria-label="Close" [dsBtnDisabled]="isSaving">
|
||||||
<span aria-hidden="true">×</span>
|
<span aria-hidden="true">×</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
<button class="btn btn-link-focus"
|
<button class="btn btn-link-focus"
|
||||||
[attr.aria-label]="'submission.sections.upload.delete.confirm.title' | translate"
|
[attr.aria-label]="'submission.sections.upload.delete.confirm.title' | translate"
|
||||||
title="{{ 'submission.sections.upload.delete.confirm.title' | translate }}"
|
title="{{ 'submission.sections.upload.delete.confirm.title' | translate }}"
|
||||||
[dsDisabled]="(processingDelete$ | async)"
|
[dsBtnDisabled]="(processingDelete$ | async)"
|
||||||
(click)="$event.preventDefault();confirmDelete(content);">
|
(click)="$event.preventDefault();confirmDelete(content);">
|
||||||
<i *ngIf="(processingDelete$ | async)" class="fas fa-circle-notch fa-spin fa-2x text-danger"></i>
|
<i *ngIf="(processingDelete$ | async)" class="fas fa-circle-notch fa-spin fa-2x text-danger"></i>
|
||||||
<i *ngIf="!(processingDelete$ | async)" class="fa fa-trash fa-2x text-danger"></i>
|
<i *ngIf="!(processingDelete$ | async)" class="fa fa-trash fa-2x text-danger"></i>
|
||||||
|
@@ -87,7 +87,7 @@
|
|||||||
<button (click)="back()" class="btn btn-outline-secondary">
|
<button (click)="back()" class="btn btn-outline-secondary">
|
||||||
<i class="fas fa-arrow-left"></i> {{ 'system-wide-alert.form.cancel' | translate }}
|
<i class="fas fa-arrow-left"></i> {{ 'system-wide-alert.form.cancel' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button class="btn btn-primary" [dsDisabled]="alertForm.invalid" (click)="save()">
|
<button class="btn btn-primary" [dsBtnDisabled]="alertForm.invalid" (click)="save()">
|
||||||
<i class="fa fa-save"></i> {{ 'system-wide-alert.form.save' | translate }}
|
<i class="fa fa-save"></i> {{ 'system-wide-alert.form.save' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
Reference in New Issue
Block a user