mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 10:04:11 +00:00
variable rename
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<div class="container">
|
||||
<form (ngSubmit)="onSubmit()" [formGroup]="formModel">
|
||||
<div class="d-flex">
|
||||
<h2 class="flex-grow-1">{{ isNewForm ? ('ldn-create-service.title' | translate) : ('ldn-edit-registered-service.title' | translate) }}</h2>
|
||||
<h2 class="flex-grow-1">{{ isNewService ? ('ldn-create-service.title' | translate) : ('ldn-edit-registered-service.title' | translate) }}</h2>
|
||||
</div>
|
||||
<!-- In the toggle section -->
|
||||
<div class="toggle-switch-container" *ngIf="!isNewForm">
|
||||
<div class="toggle-switch-container" *ngIf="!isNewService">
|
||||
<label class="status-label font-weight-bold" for="enabled">{{ 'ldn-service-status' | translate }}</label>
|
||||
<div>
|
||||
<input formControlName="enabled" hidden id="enabled" name="enabled" type="checkbox">
|
||||
@@ -371,8 +371,8 @@
|
||||
</div>
|
||||
<ng-template #confirmModal>
|
||||
<div class="modal-header">
|
||||
<h4 *ngIf="!isNewForm">{{'service.overview.edit.modal' | translate }}</h4>
|
||||
<h4 *ngIf="isNewForm">{{'service.overview.create.modal' | translate }}</h4>
|
||||
<h4 *ngIf="!isNewService">{{'service.overview.edit.modal' | translate }}</h4>
|
||||
<h4 *ngIf="isNewService">{{'service.overview.create.modal' | translate }}</h4>
|
||||
<button (click)="closeModal()" aria-label="Close"
|
||||
class="close" type="button">
|
||||
<span aria-hidden="true">×</span>
|
||||
@@ -380,23 +380,23 @@
|
||||
</div>
|
||||
|
||||
<div class="modal-body">
|
||||
<div *ngIf="!isNewForm">
|
||||
<div *ngIf="!isNewService">
|
||||
{{ 'service.overview.edit.body' | translate }}
|
||||
</div>
|
||||
<span *ngIf="isNewForm">
|
||||
<span *ngIf="isNewService">
|
||||
{{ 'service.overview.create.body' | translate }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div *ngIf="!isNewForm">
|
||||
<div *ngIf="!isNewService">
|
||||
<button (click)="closeModal()" class="btn btn-danger mr-2"
|
||||
id="delete-confirm-edit">{{ 'service.detail.return' | translate }}
|
||||
</button>
|
||||
<button *ngIf="!isNewForm" (click)="patchService()"
|
||||
<button *ngIf="!isNewService" (click)="patchService()"
|
||||
class="btn btn-primary">{{ 'service.detail.update' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
<div *ngIf="isNewForm">
|
||||
<div *ngIf="isNewService">
|
||||
<button (click)="closeModal()" class="btn btn-danger mr-2 "
|
||||
id="delete-confirm-new">{{ 'service.refuse.create' | translate }}
|
||||
</button>
|
||||
|
@@ -53,7 +53,7 @@ export class LdnServiceFormComponent implements OnInit, OnDestroy {
|
||||
|
||||
public inboundPatterns: string[] = notifyPatterns;
|
||||
public outboundPatterns: string[] = notifyPatterns;
|
||||
public isNewForm: boolean;
|
||||
public isNewService: boolean;
|
||||
public areControlsInitialized: boolean;
|
||||
itemfiltersRD$: Observable<RemoteData<PaginatedList<Itemfilter>>>;
|
||||
config: FindListOptions = Object.assign(new FindListOptions(), {
|
||||
@@ -118,11 +118,11 @@ export class LdnServiceFormComponent implements OnInit, OnDestroy {
|
||||
combineLatestWith(this.route.url)
|
||||
).subscribe(([params, segment]) => {
|
||||
this.serviceId = params.serviceId;
|
||||
this.isNewForm = segment[0].path === 'new';
|
||||
this.isNewService = segment[0].path === 'new';
|
||||
this.formModel.addControl('notifyServiceInboundPatterns', this.formBuilder.array([this.createInboundPatternFormGroup()]));
|
||||
this.formModel.addControl('notifyServiceOutboundPatterns', this.formBuilder.array([this.createOutboundPatternFormGroup()]));
|
||||
this.areControlsInitialized = true;
|
||||
if (this.serviceId && !this.isNewForm) {
|
||||
if (this.serviceId && !this.isNewService) {
|
||||
this.fetchServiceData(this.serviceId);
|
||||
}
|
||||
});
|
||||
@@ -657,7 +657,7 @@ export class LdnServiceFormComponent implements OnInit, OnDestroy {
|
||||
isNew: true
|
||||
};
|
||||
|
||||
if (this.isNewForm) {
|
||||
if (this.isNewService) {
|
||||
delete outBoundFormGroup.isNew;
|
||||
}
|
||||
|
||||
@@ -677,7 +677,7 @@ export class LdnServiceFormComponent implements OnInit, OnDestroy {
|
||||
isNew: true
|
||||
};
|
||||
|
||||
if (this.isNewForm) {
|
||||
if (this.isNewService) {
|
||||
delete inBoundFormGroup.isNew;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user