mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-15 14:03:06 +00:00
[CST-12700] fixes
This commit is contained in:
@@ -5,7 +5,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- In the toggle section -->
|
<!-- In the toggle section -->
|
||||||
<div class="toggle-switch-container">
|
<div class="toggle-switch-container">
|
||||||
<label class="status-label" for="enabled">{{ 'ldn-service-status' | translate }}</label>
|
<label class="status-label font-weight-bold" for="enabled">{{ 'ldn-service-status' | translate }}</label>
|
||||||
<div>
|
<div>
|
||||||
<input formControlName="enabled" hidden id="enabled" name="enabled" type="checkbox">
|
<input formControlName="enabled" hidden id="enabled" name="enabled" type="checkbox">
|
||||||
<div (click)="toggleEnabled()" [class.checked]="formModel.get('enabled').value" class="toggle-switch">
|
<div (click)="toggleEnabled()" [class.checked]="formModel.get('enabled').value" class="toggle-switch">
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- In the Name section -->
|
<!-- In the Name section -->
|
||||||
<div class="mb-5">
|
<div class="mb-5">
|
||||||
<label for="name">{{ 'ldn-new-service.form.label.name' | translate }}</label>
|
<label for="name" class="font-weight-bold">{{ 'ldn-new-service.form.label.name' | translate }}</label>
|
||||||
<input [class.invalid-field]="formModel.get('name').invalid && formModel.get('name').touched"
|
<input [class.invalid-field]="formModel.get('name').invalid && formModel.get('name').touched"
|
||||||
[placeholder]="'ldn-new-service.form.placeholder.name' | translate" class="form-control"
|
[placeholder]="'ldn-new-service.form.placeholder.name' | translate" class="form-control"
|
||||||
formControlName="name"
|
formControlName="name"
|
||||||
@@ -29,14 +29,14 @@
|
|||||||
|
|
||||||
<!-- In the description section -->
|
<!-- In the description section -->
|
||||||
<div class="mb-5 mt-5 d-flex flex-column">
|
<div class="mb-5 mt-5 d-flex flex-column">
|
||||||
<label for="description">{{ 'ldn-new-service.form.label.description' | translate }}</label>
|
<label for="description" class="font-weight-bold">{{ 'ldn-new-service.form.label.description' | translate }}</label>
|
||||||
<textarea [placeholder]="'ldn-new-service.form.placeholder.description' | translate"
|
<textarea [placeholder]="'ldn-new-service.form.placeholder.description' | translate"
|
||||||
class="form-control" formControlName="description" id="description" name="description"></textarea>
|
class="form-control" formControlName="description" id="description" name="description"></textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- In the url section -->
|
<!-- In the url section -->
|
||||||
<div class="mb-5 mt-5">
|
<div class="mb-5 mt-5">
|
||||||
<label for="url">{{ 'ldn-new-service.form.label.url' | translate }}</label>
|
<label for="url" class="font-weight-bold">{{ 'ldn-new-service.form.label.url' | translate }}</label>
|
||||||
<input [class.invalid-field]="formModel.get('url').invalid && formModel.get('url').touched"
|
<input [class.invalid-field]="formModel.get('url').invalid && formModel.get('url').touched"
|
||||||
[placeholder]="'ldn-new-service.form.placeholder.url' | translate" class="form-control"
|
[placeholder]="'ldn-new-service.form.placeholder.url' | translate" class="form-control"
|
||||||
formControlName="url"
|
formControlName="url"
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
<!-- In the ldnUrl section -->
|
<!-- In the ldnUrl section -->
|
||||||
<div class="mb-5 mt-5">
|
<div class="mb-5 mt-5">
|
||||||
<label for="ldnUrl">{{ 'ldn-new-service.form.label.ldnUrl' | translate }}</label>
|
<label for="ldnUrl" class="font-weight-bold">{{ 'ldn-new-service.form.label.ldnUrl' | translate }}</label>
|
||||||
<input [class.invalid-field]="formModel.get('ldnUrl').invalid && formModel.get('ldnUrl').touched"
|
<input [class.invalid-field]="formModel.get('ldnUrl').invalid && formModel.get('ldnUrl').touched"
|
||||||
[placeholder]="'ldn-new-service.form.placeholder.ldnUrl' | translate" class="form-control"
|
[placeholder]="'ldn-new-service.form.placeholder.ldnUrl' | translate" class="form-control"
|
||||||
formControlName="ldnUrl"
|
formControlName="ldnUrl"
|
||||||
@@ -64,11 +64,12 @@
|
|||||||
|
|
||||||
<!-- In the score section -->
|
<!-- In the score section -->
|
||||||
<div class="mb-2">
|
<div class="mb-2">
|
||||||
<label for="score">{{ 'ldn-new-service.form.label.score' | translate }}</label>
|
<label for="score" class="font-weight-bold">{{ 'ldn-new-service.form.label.score' | translate }}</label>
|
||||||
<input [class.invalid-field]="formModel.get('score').invalid && formModel.get('score').touched"
|
<input [class.invalid-field]="formModel.get('score').invalid && formModel.get('score').touched"
|
||||||
[placeholder]="'ldn-new-service.form.placeholder.score' | translate" formControlName="score"
|
[placeholder]="'ldn-new-service.form.placeholder.score' | translate" formControlName="score"
|
||||||
id="score"
|
id="score"
|
||||||
name="score"
|
name="score"
|
||||||
|
class="form-control"
|
||||||
type="text">
|
type="text">
|
||||||
<div *ngIf="formModel.get('score').invalid && formModel.get('score').touched" class="error-text">
|
<div *ngIf="formModel.get('score').invalid && formModel.get('score').touched" class="error-text">
|
||||||
{{ 'ldn-new-service.form.error.score' | translate }}
|
{{ 'ldn-new-service.form.error.score' | translate }}
|
||||||
@@ -78,14 +79,14 @@
|
|||||||
<!-- In the Inbound Patterns Labels section -->
|
<!-- In the Inbound Patterns Labels section -->
|
||||||
<div class="row mb-1 mt-5">
|
<div class="row mb-1 mt-5">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<label>{{ 'ldn-new-service.form.label.inboundPattern' | translate }} </label>
|
<label class="font-weight-bold">{{ 'ldn-new-service.form.label.inboundPattern' | translate }} </label>
|
||||||
</div>
|
</div>
|
||||||
<ng-container *ngIf="!!(formModel.get('notifyServiceInboundPatterns')['controls'][0]?.value?.pattern)">
|
<ng-container *ngIf="!!(formModel.get('notifyServiceInboundPatterns')['controls'][0]?.value?.pattern)">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<label>{{ 'ldn-new-service.form.label.ItemFilter' | translate }}</label>
|
<label class="font-weight-bold">{{ 'ldn-new-service.form.label.ItemFilter' | translate }}</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-1">
|
<div class="col-sm-1">
|
||||||
<label class="">{{ 'ldn-new-service.form.label.automatic' | translate }}</label>
|
<label class="font-weight-bold">{{ 'ldn-new-service.form.label.automatic' | translate }}</label>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<div class="col-sm-2">
|
<div class="col-sm-2">
|
||||||
@@ -213,11 +214,11 @@
|
|||||||
<!-- In the Outbound Patterns Labels section -->
|
<!-- In the Outbound Patterns Labels section -->
|
||||||
<div class="row mb-1 mt-5">
|
<div class="row mb-1 mt-5">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<label>{{ 'ldn-new-service.form.label.outboundPattern' | translate }} </label>
|
<label class="font-weight-bold">{{ 'ldn-new-service.form.label.outboundPattern' | translate }} </label>
|
||||||
</div>
|
</div>
|
||||||
<ng-container *ngIf="!!(formModel.get('notifyServiceOutboundPatterns')['controls'][0]?.value?.pattern)">
|
<ng-container *ngIf="!!(formModel.get('notifyServiceOutboundPatterns')['controls'][0]?.value?.pattern)">
|
||||||
<div class="col">
|
<div class="col">
|
||||||
<label>{{ 'ldn-new-service.form.label.ItemFilter' | translate }}</label>
|
<label class="font-weight-bold">{{ 'ldn-new-service.form.label.ItemFilter' | translate }}</label>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<div class="col-sm-1 ">
|
<div class="col-sm-1 ">
|
||||||
@@ -336,28 +337,23 @@
|
|||||||
</ng-container>
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span
|
<div
|
||||||
(click)="addOutboundPattern()"
|
(click)="addOutboundPattern()"
|
||||||
class="add-pattern-link mb-2">{{ 'ldn-new-service.form.label.addPattern' | translate }}
|
class="add-pattern-link mb-4">{{ 'ldn-new-service.form.label.addPattern' | translate }}
|
||||||
</span>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div aria-label="Basic example" class="submission-form-footer mt-1 mb-1 position-sticky" role="group">
|
<div class="submission-form-footer my-1 position-sticky d-flex justify-content-between" role="group">
|
||||||
<button class="btn btn-primary" type="submit">
|
<button (click)="openResetFormModal(resetFormModal)" class="btn btn-danger" type="button">
|
||||||
<span><i class="fas fa-save"></i> {{ 'ldn-new-service.form.label.submit' | translate }}</span>
|
<span><i class="fas fa-trash"></i> {{ 'submission.general.discard.submit' | translate }}</span>
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-primary" type="submit">
|
||||||
|
<span><i class="fas fa-save"></i> {{ 'ldn-new-service.form.label.submit' | translate }}</span>
|
||||||
</button>
|
</button>
|
||||||
<div class="d-flex">
|
|
||||||
<button (click)="openResetFormModal(resetFormModal)" class="btn btn-danger" type="button">
|
|
||||||
<span><i class="fas fa-trash"></i> {{ 'submission.general.discard.submit' | translate }}</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<ng-template #confirmModal>
|
<ng-template #confirmModal>
|
||||||
|
|
||||||
<div>
|
|
||||||
|
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<div>
|
<div>
|
||||||
<h4>{{'service.overview.edit.modal' | translate }}</h4>
|
<h4>{{'service.overview.edit.modal' | translate }}</h4>
|
||||||
@@ -377,11 +373,10 @@
|
|||||||
id="delete-confirm">{{ 'service.detail.return' | translate }}
|
id="delete-confirm">{{ 'service.detail.return' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button (click)="patchService()"
|
<button (click)="patchService()"
|
||||||
class="btn btn-primary custom-btn">{{ 'service.detail.update' | translate }}
|
class="btn btn-primary">{{ 'service.detail.update' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</ng-template>
|
</ng-template>
|
||||||
|
|
||||||
<ng-template #resetFormModal>
|
<ng-template #resetFormModal>
|
||||||
@@ -407,7 +402,7 @@
|
|||||||
id="reset-delete">{{ 'service.overview.reset-form.reset-confirm' | translate }}
|
id="reset-delete">{{ 'service.overview.reset-form.reset-confirm' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button (click)="resetFormAndLeave()"
|
<button (click)="resetFormAndLeave()"
|
||||||
class="btn btn-primary custom-btn"
|
class="btn btn-primary"
|
||||||
id="reset-confirm">{{ 'service.overview.reset-form.reset-return' | translate }}
|
id="reset-confirm">{{ 'service.overview.reset-form.reset-return' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -124,11 +124,6 @@ textarea {
|
|||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
form button.btn.btn-primary[type="submit"] {
|
|
||||||
position: absolute;
|
|
||||||
right: 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.submission-form-footer {
|
.submission-form-footer {
|
||||||
border-radius: var(--bs-card-border-radius);
|
border-radius: var(--bs-card-border-radius);
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
@@ -19,7 +19,7 @@ import {Observable} from 'rxjs';
|
|||||||
import {PaginationService} from '../../../core/pagination/pagination.service';
|
import {PaginationService} from '../../../core/pagination/pagination.service';
|
||||||
import {FindListOptions} from '../../../core/data/find-list-options.model';
|
import {FindListOptions} from '../../../core/data/find-list-options.model';
|
||||||
import {PaginationComponentOptions} from '../../../shared/pagination/pagination-component-options.model';
|
import {PaginationComponentOptions} from '../../../shared/pagination/pagination-component-options.model';
|
||||||
import {NotifyServicePattern} from "../ldn-services-model/ldn-service-patterns.model";
|
import {NotifyServicePattern} from '../ldn-services-model/ldn-service-patterns.model';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-ldn-service-form-edit',
|
selector: 'ds-ldn-service-form-edit',
|
||||||
@@ -69,6 +69,7 @@ export class LdnServiceFormEditComponent implements OnInit {
|
|||||||
private deletedOutboundPatterns: number[] = [];
|
private deletedOutboundPatterns: number[] = [];
|
||||||
private modalRef: any;
|
private modalRef: any;
|
||||||
private service: LdnService;
|
private service: LdnService;
|
||||||
|
private selectPatternDefaultLabeli18Key = 'ldn-service.form.label.placeholder.default-select';
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
protected ldnServicesService: LdnServicesService,
|
protected ldnServicesService: LdnServicesService,
|
||||||
@@ -132,8 +133,8 @@ export class LdnServiceFormEditComponent implements OnInit {
|
|||||||
type: this.service.type,
|
type: this.service.type,
|
||||||
enabled: this.service.enabled
|
enabled: this.service.enabled
|
||||||
});
|
});
|
||||||
this.filterPatternObjectsAndPickLabel('notifyServiceInboundPatterns', false)
|
this.filterPatternObjectsAndPickLabel('notifyServiceInboundPatterns', false);
|
||||||
this.filterPatternObjectsAndPickLabel('notifyServiceOutboundPatterns', true)
|
this.filterPatternObjectsAndPickLabel('notifyServiceOutboundPatterns', true);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
@@ -144,9 +145,9 @@ export class LdnServiceFormEditComponent implements OnInit {
|
|||||||
PatternsArray.clear();
|
PatternsArray.clear();
|
||||||
let servicesToUse;
|
let servicesToUse;
|
||||||
if (isOutbound) {
|
if (isOutbound) {
|
||||||
servicesToUse = this.service.notifyServiceOutboundPatterns
|
servicesToUse = this.service.notifyServiceOutboundPatterns;
|
||||||
} else {
|
} else {
|
||||||
servicesToUse = this.service.notifyServiceInboundPatterns
|
servicesToUse = this.service.notifyServiceInboundPatterns;
|
||||||
}
|
}
|
||||||
|
|
||||||
servicesToUse.forEach((patternObj: NotifyServicePattern) => {
|
servicesToUse.forEach((patternObj: NotifyServicePattern) => {
|
||||||
@@ -159,12 +160,12 @@ export class LdnServiceFormEditComponent implements OnInit {
|
|||||||
const newPatternObjWithLabel = Object.assign(new NotifyServicePattern(), {
|
const newPatternObjWithLabel = Object.assign(new NotifyServicePattern(), {
|
||||||
...patternObj,
|
...patternObj,
|
||||||
patternLabel: this.translateService.instant('ldn-service.form.pattern.' + patternObj?.pattern + '.label')
|
patternLabel: this.translateService.instant('ldn-service.form.pattern.' + patternObj?.pattern + '.label')
|
||||||
})
|
});
|
||||||
patternFormGroup.patchValue(newPatternObjWithLabel);
|
patternFormGroup.patchValue(newPatternObjWithLabel);
|
||||||
|
|
||||||
PatternsArray.push(patternFormGroup);
|
PatternsArray.push(patternFormGroup);
|
||||||
this.cdRef.detectChanges();
|
this.cdRef.detectChanges();
|
||||||
})
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -217,26 +218,26 @@ export class LdnServiceFormEditComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
selectOutboundPattern(patternValue: string, index: number): void {
|
selectOutboundPattern(patternValue: string, index: number): void {
|
||||||
const patternArray = (this.formModel.get('notifyServiceOutboundPatterns') as FormArray)
|
const patternArray = (this.formModel.get('notifyServiceOutboundPatterns') as FormArray);
|
||||||
patternArray.controls[index].patchValue({pattern: patternValue})
|
patternArray.controls[index].patchValue({pattern: patternValue});
|
||||||
patternArray.controls[index].patchValue({patternLabel: this.translateService.instant('ldn-service.form.pattern.' + patternValue + '.label')})
|
patternArray.controls[index].patchValue({patternLabel: this.translateService.instant('ldn-service.form.pattern.' + patternValue + '.label')});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
selectOutboundItemFilter(filterValue: string, index: number) {
|
selectOutboundItemFilter(filterValue: string, index: number) {
|
||||||
const filterArray = (this.formModel.get('notifyServiceOutboundPatterns') as FormArray)
|
const filterArray = (this.formModel.get('notifyServiceOutboundPatterns') as FormArray);
|
||||||
filterArray.controls[index].patchValue({constraint: filterValue})
|
filterArray.controls[index].patchValue({constraint: filterValue});
|
||||||
}
|
}
|
||||||
|
|
||||||
selectInboundPattern(patternValue: string, index: number): void {
|
selectInboundPattern(patternValue: string, index: number): void {
|
||||||
const patternArray = (this.formModel.get('notifyServiceInboundPatterns') as FormArray)
|
const patternArray = (this.formModel.get('notifyServiceInboundPatterns') as FormArray);
|
||||||
patternArray.controls[index].patchValue({pattern: patternValue})
|
patternArray.controls[index].patchValue({pattern: patternValue});
|
||||||
patternArray.controls[index].patchValue({patternLabel: this.translateService.instant('ldn-service.form.pattern.' + patternValue + '.label')})
|
patternArray.controls[index].patchValue({patternLabel: this.translateService.instant('ldn-service.form.pattern.' + patternValue + '.label')});
|
||||||
}
|
}
|
||||||
|
|
||||||
selectInboundItemFilter(filterValue: string, index: number): void {
|
selectInboundItemFilter(filterValue: string, index: number): void {
|
||||||
const filterArray = (this.formModel.get('notifyServiceInboundPatterns') as FormArray)
|
const filterArray = (this.formModel.get('notifyServiceInboundPatterns') as FormArray);
|
||||||
filterArray.controls[index].patchValue({constraint: filterValue})
|
filterArray.controls[index].patchValue({constraint: filterValue});
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleAutomatic(i: number) {
|
toggleAutomatic(i: number) {
|
||||||
@@ -387,7 +388,7 @@ export class LdnServiceFormEditComponent implements OnInit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private handlePatterns(patchOperations: any[], formArrayName: string): void {
|
private handlePatterns(patchOperations: any[], formArrayName: string): void {
|
||||||
const patternsArray = this.formModel.get(formArrayName) as FormArray
|
const patternsArray = this.formModel.get(formArrayName) as FormArray;
|
||||||
|
|
||||||
|
|
||||||
for (let i = 0; i < patternsArray.length; i++) {
|
for (let i = 0; i < patternsArray.length; i++) {
|
||||||
@@ -423,7 +424,7 @@ export class LdnServiceFormEditComponent implements OnInit {
|
|||||||
private createOutboundPatternFormGroup(): FormGroup {
|
private createOutboundPatternFormGroup(): FormGroup {
|
||||||
return this.formBuilder.group({
|
return this.formBuilder.group({
|
||||||
pattern: '',
|
pattern: '',
|
||||||
patternLabel: 'Select a pattern',
|
patternLabel: this.translateService.instant(this.selectPatternDefaultLabeli18Key),
|
||||||
constraint: '',
|
constraint: '',
|
||||||
isNew: true,
|
isNew: true,
|
||||||
});
|
});
|
||||||
@@ -432,7 +433,7 @@ export class LdnServiceFormEditComponent implements OnInit {
|
|||||||
private createInboundPatternFormGroup(): FormGroup {
|
private createInboundPatternFormGroup(): FormGroup {
|
||||||
return this.formBuilder.group({
|
return this.formBuilder.group({
|
||||||
pattern: '',
|
pattern: '',
|
||||||
patternLabel: 'Select a pattern',
|
patternLabel: this.translateService.instant(this.selectPatternDefaultLabeli18Key),
|
||||||
constraint: '',
|
constraint: '',
|
||||||
automatic: false,
|
automatic: false,
|
||||||
isNew: true
|
isNew: true
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
<div class="container">
|
<div class="container">
|
||||||
<form (ngSubmit)="onSubmit()" [formGroup]="formModel">
|
<form (ngSubmit)="onSubmit()" [formGroup]="formModel">
|
||||||
<div class="d-flex">
|
<div class="d-flex mb-5">
|
||||||
<h2 class="flex-grow-1">{{ 'ldn-create-service.title' | translate }}</h2>
|
<h2 class="flex-grow-1">{{ 'ldn-create-service.title' | translate }}</h2>
|
||||||
</div>
|
</div>
|
||||||
<!-- In the name section -->
|
<!-- In the name section -->
|
||||||
<div class="mb-5 ">
|
<div class="mb-5">
|
||||||
<label for="name">{{ 'ldn-new-service.form.label.name' | translate }}</label>
|
<label for="name">{{ 'ldn-new-service.form.label.name' | translate }}</label>
|
||||||
<input [class.invalid-field]="formModel.get('name').invalid && formModel.get('name').touched"
|
<input [class.invalid-field]="formModel.get('name').invalid && formModel.get('name').touched"
|
||||||
[placeholder]="'ldn-new-service.form.placeholder.name' | translate" class="form-control"
|
[placeholder]="'ldn-new-service.form.placeholder.name' | translate" class="form-control"
|
||||||
@@ -60,6 +60,7 @@
|
|||||||
[placeholder]="'ldn-new-service.form.placeholder.score' | translate" formControlName="score"
|
[placeholder]="'ldn-new-service.form.placeholder.score' | translate" formControlName="score"
|
||||||
id="score"
|
id="score"
|
||||||
name="score"
|
name="score"
|
||||||
|
class="form-control"
|
||||||
type="text">
|
type="text">
|
||||||
<div *ngIf="formModel.get('score').invalid && formModel.get('score').touched" class="error-text">
|
<div *ngIf="formModel.get('score').invalid && formModel.get('score').touched" class="error-text">
|
||||||
{{ 'ldn-new-service.form.error.score' | translate }}
|
{{ 'ldn-new-service.form.error.score' | translate }}
|
||||||
@@ -79,7 +80,7 @@
|
|||||||
<label class="">{{ 'ldn-new-service.form.label.automatic' | translate }}</label>
|
<label class="">{{ 'ldn-new-service.form.label.automatic' | translate }}</label>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<div class="col-sm-2">
|
<div class="col-sm-1">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -202,12 +203,7 @@
|
|||||||
<label class="">{{ 'ldn-new-service.form.label.ItemFilter' | translate }}</label>
|
<label class="">{{ 'ldn-new-service.form.label.ItemFilter' | translate }}</label>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<div class="col-sm1 ">
|
<div class="col-sm-2">
|
||||||
<label class="label-box-2" style="visibility: hidden;">
|
|
||||||
{{ 'ldn-new-service.form.label.automatic' | translate }}
|
|
||||||
</label>
|
|
||||||
</div>
|
|
||||||
<div class="col-sm-2 ">
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -311,25 +307,19 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<span (click)="addOutboundPattern()"
|
<div (click)="addOutboundPattern()"
|
||||||
class="add-pattern-link mb-4">{{ 'ldn-new-service.form.label.addPattern' | translate }}
|
class="add-pattern-link mb-4">{{ 'ldn-new-service.form.label.addPattern' | translate }}
|
||||||
</span>
|
|
||||||
<div class="mb-4">
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div aria-label="Basic example" class="submission-form-footer mt-1 mb-1 position-sticky" role="group">
|
<div class="submission-form-footer my-1 position-sticky d-flex justify-content-between" role="group">
|
||||||
<button class="btn btn-primary" type="submit">
|
<button (click)="this.openResetFormModal(this.resetFormModal)" class="btn btn-danger" type="button">
|
||||||
<span><i class="fas fa-save"></i> {{ 'ldn-new-service.form.label.submit' | translate }}</span>
|
<span><i class="fas fa-trash"></i> {{ 'submission.general.discard.submit' | translate }}</span>
|
||||||
|
</button>
|
||||||
|
<button class="btn btn-primary" type="submit">
|
||||||
|
<span><i class="fas fa-save"></i> {{ 'ldn-new-service.form.label.submit' | translate }}</span>
|
||||||
</button>
|
</button>
|
||||||
<div class="d-flex">
|
|
||||||
<button (click)="this.openResetFormModal(this.resetFormModal)" class="btn btn-danger" type="button">
|
|
||||||
<span><i class="fas fa-trash"></i> {{ 'submission.general.discard.submit' | translate }}</span>
|
|
||||||
</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
<ng-template #confirmModal>
|
<ng-template #confirmModal>
|
||||||
@@ -348,14 +338,14 @@
|
|||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div>
|
<div>
|
||||||
{{ 'service.create.body' | translate }}
|
{{ 'service.overview.create.body' | translate }}
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<button (click)="closeModal()" class="btn btn-danger"
|
<button (click)="closeModal()" class="btn btn-danger mr-2 "
|
||||||
id="delete-confirm">{{ 'service.refuse.create' | translate }}
|
id="delete-confirm">{{ 'service.refuse.create' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button (click)="createService()"
|
<button (click)="createService()"
|
||||||
class="btn btn-primary mr-2 custom-btn">{{ 'service.confirm.create' | translate }}
|
class="btn btn-primary">{{ 'service.confirm.create' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -368,7 +358,7 @@
|
|||||||
|
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
<div>
|
<div>
|
||||||
<h4>{{'service.create.reset-form.modal' | translate }}</h4>
|
<h4>{{'service.overview.reset-form.modal' | translate }}</h4>
|
||||||
</div>
|
</div>
|
||||||
<button (click)="closeModal()" aria-label="Close"
|
<button (click)="closeModal()" aria-label="Close"
|
||||||
class="close" type="button">
|
class="close" type="button">
|
||||||
@@ -378,11 +368,11 @@
|
|||||||
|
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<div>
|
<div>
|
||||||
{{ 'service.create.reset-form.body' | translate }}
|
{{ 'service.overview.reset-form.body' | translate }}
|
||||||
</div>
|
</div>
|
||||||
<div class="mt-4">
|
<div class="mt-4">
|
||||||
<button (click)="resetFormAndLeave()"
|
<button (click)="resetFormAndLeave()"
|
||||||
class="btn btn-primary mr-2 custom-btn"
|
class="btn btn-primary mr-2"
|
||||||
id="reset-confirm">{{ 'service.overview.reset-form.reset-return' | translate }}
|
id="reset-confirm">{{ 'service.overview.reset-form.reset-return' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button (click)="closeModal()" class="btn btn-danger"
|
<button (click)="closeModal()" class="btn btn-danger"
|
||||||
|
@@ -114,12 +114,6 @@ textarea {
|
|||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
form button.btn.btn-primary[type="submit"] {
|
|
||||||
position: absolute;
|
|
||||||
bottom: 0;
|
|
||||||
right: -10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.submission-form-footer {
|
.submission-form-footer {
|
||||||
border-radius: var(--bs-card-border-radius);
|
border-radius: var(--bs-card-border-radius);
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
@@ -66,6 +66,7 @@ export class LdnServiceFormComponent implements OnInit {
|
|||||||
hasOutboundPattern: boolean;
|
hasOutboundPattern: boolean;
|
||||||
isScoreValid: boolean;
|
isScoreValid: boolean;
|
||||||
private modalRef: any;
|
private modalRef: any;
|
||||||
|
private selectPatternDefaultLabeli18Key = 'ldn-service.form.label.placeholder.default-select';
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
private ldnServicesService: LdnServicesService,
|
private ldnServicesService: LdnServicesService,
|
||||||
@@ -225,27 +226,27 @@ export class LdnServiceFormComponent implements OnInit {
|
|||||||
|
|
||||||
|
|
||||||
selectOutboundPattern(patternValue: string, index: number): void {
|
selectOutboundPattern(patternValue: string, index: number): void {
|
||||||
const patternArray = (this.formModel.get('notifyServiceOutboundPatterns') as FormArray)
|
const patternArray = (this.formModel.get('notifyServiceOutboundPatterns') as FormArray);
|
||||||
patternArray.controls[index].patchValue({pattern: patternValue})
|
patternArray.controls[index].patchValue({pattern: patternValue});
|
||||||
patternArray.controls[index].patchValue({patternLabel: this.translateService.instant('ldn-service.form.pattern.' + patternValue + '.label')})
|
patternArray.controls[index].patchValue({patternLabel: this.translateService.instant('ldn-service.form.pattern.' + patternValue + '.label')});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
selectInboundPattern(patternValue: string, index: number): void {
|
selectInboundPattern(patternValue: string, index: number): void {
|
||||||
const patternArray = (this.formModel.get('notifyServiceInboundPatterns') as FormArray)
|
const patternArray = (this.formModel.get('notifyServiceInboundPatterns') as FormArray);
|
||||||
patternArray.controls[index].patchValue({pattern: patternValue})
|
patternArray.controls[index].patchValue({pattern: patternValue});
|
||||||
patternArray.controls[index].patchValue({patternLabel: this.translateService.instant('ldn-service.form.pattern.' + patternValue + '.label')})
|
patternArray.controls[index].patchValue({patternLabel: this.translateService.instant('ldn-service.form.pattern.' + patternValue + '.label')});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
selectInboundItemFilter(filterValue: string, index: number): void {
|
selectInboundItemFilter(filterValue: string, index: number): void {
|
||||||
const filterArray = (this.formModel.get('notifyServiceInboundPatterns') as FormArray)
|
const filterArray = (this.formModel.get('notifyServiceInboundPatterns') as FormArray);
|
||||||
filterArray.controls[index].patchValue({constraint: filterValue})
|
filterArray.controls[index].patchValue({constraint: filterValue});
|
||||||
}
|
}
|
||||||
|
|
||||||
selectOutboundItemFilter(filterValue: string, index: number) {
|
selectOutboundItemFilter(filterValue: string, index: number) {
|
||||||
const filterArray = (this.formModel.get('notifyServiceOutboundPatterns') as FormArray)
|
const filterArray = (this.formModel.get('notifyServiceOutboundPatterns') as FormArray);
|
||||||
filterArray.controls[index].patchValue({constraint: filterValue})
|
filterArray.controls[index].patchValue({constraint: filterValue});
|
||||||
}
|
}
|
||||||
|
|
||||||
private sendBack() {
|
private sendBack() {
|
||||||
@@ -257,7 +258,7 @@ export class LdnServiceFormComponent implements OnInit {
|
|||||||
return this.formBuilder.group({
|
return this.formBuilder.group({
|
||||||
pattern: [''],
|
pattern: [''],
|
||||||
constraint: [''],
|
constraint: [''],
|
||||||
patternLabel: 'Select a Pattern',
|
patternLabel: this.translateService.instant(this.selectPatternDefaultLabeli18Key),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -266,7 +267,7 @@ export class LdnServiceFormComponent implements OnInit {
|
|||||||
pattern: [''],
|
pattern: [''],
|
||||||
constraint: [''],
|
constraint: [''],
|
||||||
automatic: false,
|
automatic: false,
|
||||||
patternLabel: 'Select a Pattern',
|
patternLabel: this.translateService.instant(this.selectPatternDefaultLabeli18Key),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
import { DSpaceObject } from '../../core/shared/dspace-object.model';
|
import { DSpaceObject } from '../../core/shared/dspace-object.model';
|
||||||
import { Item } from '../../core/shared/item.model';
|
import { Item } from '../../core/shared/item.model';
|
||||||
import { SearchResult } from '../search/models/search-result.model';
|
import { SearchResult } from '../search/models/search-result.model';
|
||||||
import { SuggestionsService } from '../../suggestion-notifications/reciter-suggestions/suggestions.service';
|
|
||||||
|
|
||||||
// REST Mock ---------------------------------------------------------------------
|
// REST Mock ---------------------------------------------------------------------
|
||||||
// -------------------------------------------------------------------------------
|
// -------------------------------------------------------------------------------
|
||||||
|
@@ -5,7 +5,6 @@ import { SuggestionsPageResolver } from './suggestions-page.resolver';
|
|||||||
import { SuggestionsPageComponent } from './suggestions-page.component';
|
import { SuggestionsPageComponent } from './suggestions-page.component';
|
||||||
import { AuthenticatedGuard } from '../core/auth/authenticated.guard';
|
import { AuthenticatedGuard } from '../core/auth/authenticated.guard';
|
||||||
import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver';
|
import { I18nBreadcrumbResolver } from '../core/breadcrumbs/i18n-breadcrumb.resolver';
|
||||||
import { SiteAdministratorGuard } from '../core/data/feature-authorization/feature-authorization-guard/site-administrator.guard';
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
@@ -892,7 +892,7 @@
|
|||||||
|
|
||||||
"coar-notify-support.title": "COAR Notify Protocol",
|
"coar-notify-support.title": "COAR Notify Protocol",
|
||||||
|
|
||||||
"coar-notify-support-title.content":"Here, we fully support the COAR Notify protocol, which is designed to enhance the communication between repositories. To learn more about the COAR Notify protocol, you can visit their official website <a href=\"https://notify.coar-repositories.org/\">here</a>.",
|
"coar-notify-support-title.content": "Here, we fully support the COAR Notify protocol, which is designed to enhance the communication between repositories. To learn more about the COAR Notify protocol, you can visit their official website <a href=\"https://notify.coar-repositories.org/\">here</a>.",
|
||||||
|
|
||||||
"coar-notify-support.ldn-inbox.title": "LDN InBox",
|
"coar-notify-support.ldn-inbox.title": "LDN InBox",
|
||||||
|
|
||||||
@@ -905,7 +905,7 @@
|
|||||||
"service.overview.delete.header": "Delete Service",
|
"service.overview.delete.header": "Delete Service",
|
||||||
|
|
||||||
"ldn-registered-services.title": "Registered Services",
|
"ldn-registered-services.title": "Registered Services",
|
||||||
"ldn-registered-services.table.name":"Name",
|
"ldn-registered-services.table.name": "Name",
|
||||||
"ldn-registered-services.table.description": "Description",
|
"ldn-registered-services.table.description": "Description",
|
||||||
"ldn-registered-services.table.status": "Status",
|
"ldn-registered-services.table.status": "Status",
|
||||||
"ldn-registered-services.table.action": "Action",
|
"ldn-registered-services.table.action": "Action",
|
||||||
@@ -920,7 +920,7 @@
|
|||||||
"ldn-edit-registered-service.title": "Edit Service",
|
"ldn-edit-registered-service.title": "Edit Service",
|
||||||
"ldn-create-service.title": "Create service",
|
"ldn-create-service.title": "Create service",
|
||||||
"service.overview.create.modal": "Create Service",
|
"service.overview.create.modal": "Create Service",
|
||||||
"service.overview.create.body": "Please confirm the creation of this service",
|
"service.overview.create.body": "Please confirm the creation of this service.",
|
||||||
"ldn-service-status": "Status",
|
"ldn-service-status": "Status",
|
||||||
"service.confirm.create": "Create",
|
"service.confirm.create": "Create",
|
||||||
"service.refuse.create": "Discard",
|
"service.refuse.create": "Discard",
|
||||||
@@ -936,8 +936,7 @@
|
|||||||
"ldn-new-service.form.placeholder.url": "Please input the URL for users to check out more information about the service",
|
"ldn-new-service.form.placeholder.url": "Please input the URL for users to check out more information about the service",
|
||||||
"ldn-new-service.form.placeholder.ldnUrl": "Please specify the URL of the LDN Inbox",
|
"ldn-new-service.form.placeholder.ldnUrl": "Please specify the URL of the LDN Inbox",
|
||||||
"ldn-new-service.form.placeholder.score": "Please enter a value between 0 and 1. Use the “.” as decimal separator",
|
"ldn-new-service.form.placeholder.score": "Please enter a value between 0 and 1. Use the “.” as decimal separator",
|
||||||
"ldn-new-service.form.label.inboundPattern": "Inbound Patterns",
|
"ldn-service.form.label.placeholder.default-select": "Select a pattern",
|
||||||
"ldn-new-service.form.label.placeholder.inboundPattern": "Select an Inbound Pattern",
|
|
||||||
|
|
||||||
"ldn-service.form.pattern.ack-accept.label": "Acknowledge and Accept",
|
"ldn-service.form.pattern.ack-accept.label": "Acknowledge and Accept",
|
||||||
"ldn-service.form.pattern.ack-accept.description": "This pattern is used to acknowledge and accept a request (offer). It implies an intention to act on the request.",
|
"ldn-service.form.pattern.ack-accept.description": "This pattern is used to acknowledge and accept a request (offer). It implies an intention to act on the request.",
|
||||||
@@ -1012,7 +1011,7 @@
|
|||||||
"service.detail.return": "Cancel",
|
"service.detail.return": "Cancel",
|
||||||
"service.overview.reset-form.body": "Are you sure you want to discard those changes and leave?",
|
"service.overview.reset-form.body": "Are you sure you want to discard those changes and leave?",
|
||||||
"service.overview.reset-form.modal": "Discard Service Changes",
|
"service.overview.reset-form.modal": "Discard Service Changes",
|
||||||
"service.overview.reset-form.reset-confirm":"Discard",
|
"service.overview.reset-form.reset-confirm": "Discard",
|
||||||
"admin.registries.services-formats.modify.success.head": "Successful Edit",
|
"admin.registries.services-formats.modify.success.head": "Successful Edit",
|
||||||
"admin.registries.services-formats.modify.success.content": "The service has been edited",
|
"admin.registries.services-formats.modify.success.content": "The service has been edited",
|
||||||
"admin.registries.services-formats.modify.failure.head": "Failed Edit",
|
"admin.registries.services-formats.modify.failure.head": "Failed Edit",
|
||||||
@@ -2043,7 +2042,7 @@
|
|||||||
|
|
||||||
"info.feedback.breadcrumbs": "Feedback",
|
"info.feedback.breadcrumbs": "Feedback",
|
||||||
|
|
||||||
"info.coar-notify-support.title":"Notify Support",
|
"info.coar-notify-support.title": "Notify Support",
|
||||||
|
|
||||||
"info.coar-notify.breadcrumbs": "Notify Support",
|
"info.coar-notify.breadcrumbs": "Notify Support",
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user