2019-03-01 16:16:21 +01:00
|
|
|
<div class="dmp-editor">
|
2019-03-26 16:58:01 +01:00
|
|
|
<div>
|
|
|
|
<mat-card-title *ngIf="isNew">{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.NEW-TITLE' | translate}}</mat-card-title>
|
|
|
|
<mat-card-title *ngIf="!isNew">
|
|
|
|
<h3>{{formGroup?.get('label')?.value}} </h3>
|
|
|
|
</mat-card-title>
|
|
|
|
</div>
|
|
|
|
<form *ngIf="formGroup" (ngSubmit)="formSubmit()" [formGroup]="formGroup">
|
|
|
|
<mat-card>
|
|
|
|
<mat-card-content>
|
|
|
|
<div class="row">
|
|
|
|
<mat-form-field class="col-md-12">
|
|
|
|
<input matInput placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.FIELDS.NAME' | translate}}"
|
|
|
|
type="text" name="label" formControlName="label" required>
|
|
|
|
<mat-error *ngIf="formGroup.get('label').hasError('backendError')">
|
|
|
|
{{formGroup.get('label').getError('backendError').message}}</mat-error>
|
|
|
|
<mat-error *ngIf="formGroup.get('label').hasError('required')">
|
|
|
|
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
</mat-form-field>
|
|
|
|
<mat-form-field class="col-md-12">
|
|
|
|
<textarea matInput class="description-area" placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.FIELDS.DESCRIPTION' | translate}}"
|
|
|
|
formControlName="description"></textarea>
|
|
|
|
</mat-form-field>
|
|
|
|
<mat-form-field class="col-12">
|
|
|
|
<app-single-auto-complete [required]='true' [formControl]="formGroup.get('datasetProfile')" placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.FIELDS.PROFILE' | translate}}"
|
|
|
|
[configuration]="profilesAutoCompleteConfiguration" [disabled]="datasetIsEmpty()">
|
|
|
|
</app-single-auto-complete>
|
|
|
|
<mat-error *ngIf="formGroup.get('datasetProfile').hasError('backendError')">
|
|
|
|
{{formGroup.get('datasetProfile').getError('backendError').message}}</mat-error>
|
|
|
|
<mat-error *ngIf="formGroup.get('datasetProfile').hasError('required')">
|
|
|
|
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
</mat-form-field>
|
|
|
|
<!-- <mat-form-field class="col-md-6">
|
2019-03-01 16:16:21 +01:00
|
|
|
<app-single-auto-complete [required]='false' [formControl]="formGroup.get('profile')"
|
|
|
|
placeholder="{{'DMP-EDITOR.FIELDS.PROFILE' | translate}}"
|
|
|
|
[configuration]="dmpProfileAutoCompleteConfiguration">
|
|
|
|
</app-single-auto-complete>
|
|
|
|
</mat-form-field>
|
|
|
|
<div class="col-md-12">
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-auto"><button mat-raised-button color="primary" (click)="cancel()"
|
|
|
|
type="button">{{'DMP-EDITOR.ACTIONS.CANCEL'
|
|
|
|
| translate}}</button></div>
|
|
|
|
<div class="col"></div>
|
|
|
|
<div class="col-auto" *ngIf="!isNew && this.formGroup.enabled"><button mat-raised-button
|
|
|
|
color="primary" type="button"
|
|
|
|
(click)="delete()">{{'DMP-EDITOR.ACTIONS.DELETE' | translate}}</button></div>
|
|
|
|
<div class="col-auto" *ngIf="this.formGroup.enabled"><button mat-raised-button
|
|
|
|
color="primary" type="submit">{{'DMP-EDITOR.ACTIONS.SAVE'
|
|
|
|
| translate}}</button></div>
|
|
|
|
<div class="col-auto" *ngIf="dmp.lockable && this.formGroup.enabled"><button type="button"
|
|
|
|
mat-raised-button color="primary"
|
|
|
|
(click)="saveAndFinalize()">{{'DMP-EDITOR.ACTIONS.FINALISE' | translate}}</button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div> -->
|
2019-03-26 16:58:01 +01:00
|
|
|
</div>
|
|
|
|
</mat-card-content>
|
|
|
|
</mat-card>
|
|
|
|
</form>
|
2019-03-05 11:20:10 +01:00
|
|
|
</div>
|