2019-03-01 16:16:21 +01:00
|
|
|
<div class="dmp-editor">
|
2019-03-26 16:58:01 +01:00
|
|
|
<div>
|
2019-06-26 12:51:16 +02:00
|
|
|
<mat-card-title *ngIf="isNew">
|
|
|
|
{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.NEW-TITLE' | translate}}</mat-card-title>
|
2019-03-26 16:58:01 +01:00
|
|
|
<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">
|
2019-06-26 12:51:16 +02:00
|
|
|
<p class="col-md-12">
|
|
|
|
<b>{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.ABOUT' | translate}}</b></p>
|
|
|
|
<mat-form-field class="col-md-12 mt-3">
|
|
|
|
<input matInput
|
|
|
|
placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.FIELDS.NAME' | translate}}"
|
|
|
|
type="text" name="label" formControlName="label" required>
|
2019-03-26 16:58:01 +01:00
|
|
|
<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">
|
2019-06-26 12:51:16 +02:00
|
|
|
<textarea matInput class="description-area"
|
|
|
|
placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.FIELDS.DESCRIPTION' | translate}}"
|
|
|
|
formControlName="description"></textarea>
|
|
|
|
<mat-hint>
|
|
|
|
{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.FIELDS.DESCRIPTION-HINT' | translate}}
|
|
|
|
</mat-hint>
|
2019-03-26 16:58:01 +01:00
|
|
|
</mat-form-field>
|
2019-06-26 09:24:11 +02:00
|
|
|
<mat-form-field class="col-12 mt-3">
|
2019-06-26 12:51:16 +02:00
|
|
|
<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()">
|
2019-10-16 16:45:08 +02:00
|
|
|
<!--Warning disabled attribute with a reactive form directive -->
|
2019-03-26 16:58:01 +01:00
|
|
|
</app-single-auto-complete>
|
2019-06-26 12:51:16 +02:00
|
|
|
<mat-hint>
|
|
|
|
{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.FIELDS.PROFILE-HINT' | translate}}
|
|
|
|
</mat-hint>
|
2019-03-26 16:58:01 +01:00
|
|
|
<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>
|
2019-06-26 12:55:23 +02:00
|
|
|
<div class="col-md-12 help">
|
2019-06-26 12:51:16 +02:00
|
|
|
{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.SECOND-STEP.FIELDS.HELP' | translate}}
|
|
|
|
</div>
|
2019-03-26 16:58:01 +01:00
|
|
|
<!-- <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>
|
2019-06-26 12:51:16 +02:00
|
|
|
<!-- <div class="row">
|
|
|
|
|
|
|
|
</div> -->
|
2019-03-26 16:58:01 +01:00
|
|
|
</mat-card-content>
|
|
|
|
</mat-card>
|
|
|
|
</form>
|
2019-03-05 11:20:10 +01:00
|
|
|
</div>
|