76 lines
3.6 KiB
HTML
76 lines
3.6 KiB
HTML
<div class="clone-dialog">
|
|
<div mat-dialog-title class="row d-flex m-0">
|
|
<div *ngIf="!data.isNewVersion" class="heading-1">{{'DMP-EDITOR.TITLE.CLONE-DMP' | translate}}</div>
|
|
<div *ngIf="data.isNewVersion" class="heading-1">{{'DMP-EDITOR.TITLE.NEW-VERSION' | translate}}</div>
|
|
<span class="ml-auto align-self-center" (click)="close()"><mat-icon class="close-icon">close</mat-icon></span>
|
|
</div>
|
|
<!-- Title Field -->
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="heading">{{'DMP-EDITOR.FIELDS.NAME' | translate}}*</div>
|
|
<div class="title-form">
|
|
<mat-form-field>
|
|
<input matInput placeholder="{{'DMP-EDITOR.FIELDS.NAME' | translate}}" type="text" name="label" [formControl]="this.data.formGroup.get('label')" required>
|
|
<mat-error *ngIf="this.data.formGroup.get('label').hasError('backendError')">
|
|
{{this.data.formGroup.get('label').getError('backendError').message}}</mat-error>
|
|
<mat-error *ngIf="this.data.formGroup.get('label').hasError('required')">
|
|
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
</mat-form-field>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Description field -->
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="heading">{{'DMP-EDITOR.FIELDS.DESCRIPTION' | translate}}</div>
|
|
<div class="hint">{{'DMP-EDITOR.MAIN-INFO.HINT' | translate}}</div>
|
|
<div class="description-form">
|
|
<mat-form-field>
|
|
<textarea rows="3" matInput class="description-area" placeholder="{{'DMP-EDITOR.PLACEHOLDER.DESCRIPTION' | translate}}" [formControl]="this.data.formGroup.get('description')"></textarea>
|
|
</mat-form-field>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<!-- Profiles -->
|
|
<div class="row" *ngIf="data.isNewVersion">
|
|
<div class="col-12">
|
|
<div class="heading">{{'DMP-EDITOR.FIELDS.TEMPLATES' | translate}}</div>
|
|
<mat-form-field>
|
|
<app-multiple-auto-complete required='true' [formControl]="this.data.formGroup.get('profiles')" placeholder="{{'DMP-EDITOR.FIELDS.SELECT-TEMPLATE' | translate}}" [configuration]="profilesAutoCompleteConfiguration">
|
|
</app-multiple-auto-complete>
|
|
<mat-error *ngIf="data.formGroup.get('profiles').hasError('backendError')">
|
|
{{data.formGroup.get('profiles').getError('backendError').message}}</mat-error>
|
|
<mat-error *ngIf="data.formGroup.get('profiles').hasError('required')">
|
|
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
<!-- <button matSuffix class="input-btn" [disabled]="data.formGroup.get('profiles').disabled" (click)="allAvailableProfiles($event)">
|
|
<mat-icon class="icon-btn">view_list</mat-icon>
|
|
</button> -->
|
|
</mat-form-field>
|
|
</div>
|
|
</div>
|
|
<!-- Datasets -->
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="heading">{{'DMP-EDITOR.FIELDS.DATASETS' | translate}}</div>
|
|
<div *ngIf="hasDatasets()">
|
|
<h5>{{'DATASET-LISTING.SELECT-DATASETS-TO-CLONE' | translate}}</h5>
|
|
<mat-card class="mat-card">
|
|
<mat-selection-list #selectedItems (selectionChange)="selectionChanged(selectedItems)">
|
|
<mat-list-option *ngFor="let dataset of data.datasets;" [value]="dataset.id">
|
|
{{dataset.label}}
|
|
</mat-list-option>
|
|
</mat-selection-list>
|
|
</mat-card>
|
|
</div>
|
|
<div *ngIf="!hasDatasets()">
|
|
<h5 mat-subheader class="p-3">{{'DATASET-LISTING.SELECT-DATASETS-NONE' | translate}}</h5>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row pt-4">
|
|
<div class="col"></div>
|
|
<div class="col-auto"><button mat-raised-button type="button" class="cancel-btn" (click)="cancel()">{{ data.cancelButton }}</button></div>
|
|
<div class="col-auto"><button mat-raised-button type="button" class="confirm-btn" (click)="confirm()" color="accent">{{ data.confirmButton }}</button></div>
|
|
</div>
|
|
</div>
|