2019-01-18 18:03:45 +01:00
|
|
|
<div class="data-management-plan-wizard-editor">
|
|
|
|
<form *ngIf="formGroup" (ngSubmit)="formSubmit()" [formGroup]="formGroup">
|
|
|
|
<mat-card>
|
|
|
|
<mat-card-content>
|
2019-06-13 17:27:30 +02:00
|
|
|
<div class="d-flex row">
|
|
|
|
<mat-form-field class="col-8">
|
2019-02-14 13:14:44 +01:00
|
|
|
<input matInput placeholder="{{'DMP-EDITOR.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>
|
2019-01-18 18:03:45 +01:00
|
|
|
</mat-form-field>
|
2019-06-13 17:27:30 +02:00
|
|
|
<mat-form-field class="col-8">
|
2019-08-01 09:54:40 +02:00
|
|
|
<app-single-auto-complete [formControl]="formGroup.get('grant')"
|
2019-08-20 17:32:42 +02:00
|
|
|
placeholder="{{'DMP-EDITOR.FIELDS.GRANT' | translate}}"
|
2019-08-01 09:54:40 +02:00
|
|
|
[configuration]="grantAutoCompleteConfiguration">
|
2019-01-18 18:03:45 +01:00
|
|
|
</app-single-auto-complete>
|
2019-08-01 09:54:40 +02:00
|
|
|
<mat-error *ngIf="formGroup.get('grant').hasError('backendError')">
|
|
|
|
{{formGroup.get('grant').getError('backendError').message}}</mat-error>
|
|
|
|
<mat-error *ngIf="formGroup.get('grant').hasError('required')">
|
2019-02-14 13:14:44 +01:00
|
|
|
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
2019-01-18 18:03:45 +01:00
|
|
|
</mat-form-field>
|
|
|
|
|
2019-06-13 17:27:30 +02:00
|
|
|
<mat-form-field class="col-8">
|
2019-02-14 13:14:44 +01:00
|
|
|
<textarea matInput class="description-area"
|
2019-04-02 12:45:47 +02:00
|
|
|
placeholder="{{'DMP-EDITOR.FIELDS.DESCRIPTION' | translate}}" formControlName="description">
|
|
|
|
</textarea>
|
2019-02-14 13:14:44 +01:00
|
|
|
<mat-error *ngIf="formGroup.get('description').hasError('backendError')">
|
|
|
|
{{formGroup.get('description').getError('backendError').message}}</mat-error>
|
|
|
|
<mat-error *ngIf="formGroup.get('description').hasError('required')">
|
|
|
|
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
2019-01-18 18:03:45 +01:00
|
|
|
</mat-form-field>
|
2019-06-13 17:27:30 +02:00
|
|
|
<mat-form-field class="col-8">
|
|
|
|
<app-multiple-auto-complete [formControl]="formGroup.get('profiles')"
|
|
|
|
placeholder="{{'DMP-EDITOR.FIELDS.DATASET-TEMPLATES' | translate}}"
|
2019-02-14 13:14:44 +01:00
|
|
|
[configuration]="profilesAutoCompleteConfiguration">
|
2019-01-18 18:03:45 +01:00
|
|
|
</app-multiple-auto-complete>
|
2019-02-14 13:14:44 +01:00
|
|
|
<mat-error *ngIf="formGroup.get('profiles').hasError('backendError')">
|
|
|
|
{{formGroup.get('profiles').getError('backendError').message}}</mat-error>
|
|
|
|
<mat-error *ngIf="formGroup.get('profiles').hasError('required')">
|
|
|
|
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
2019-06-13 17:27:30 +02:00
|
|
|
<button matSuffix type="button" class="input-btn" (click)="availableProfiles()">
|
|
|
|
<mat-icon class="icon-btn">view_list</mat-icon>
|
2019-01-18 18:03:45 +01:00
|
|
|
</button>
|
|
|
|
</mat-form-field>
|
2019-06-13 17:27:30 +02:00
|
|
|
<mat-form-field class="col-8">
|
2019-02-14 13:14:44 +01:00
|
|
|
<app-multiple-auto-complete [formControl]="formGroup.get('organisations')"
|
|
|
|
placeholder="{{'DMP-EDITOR.FIELDS.ORGANISATIONS' | translate}}"
|
|
|
|
[configuration]="organisationsAutoCompleteConfiguration">
|
2019-01-18 18:03:45 +01:00
|
|
|
</app-multiple-auto-complete>
|
2019-02-14 13:14:44 +01:00
|
|
|
<mat-error *ngIf="formGroup.get('organisations').hasError('backendError')">
|
|
|
|
{{formGroup.get('organisations').getError('backendError').message}}</mat-error>
|
|
|
|
<mat-error *ngIf="formGroup.get('organisations').hasError('required')">
|
|
|
|
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
2019-01-18 18:03:45 +01:00
|
|
|
</mat-form-field>
|
2019-06-13 17:27:30 +02:00
|
|
|
<mat-form-field class="col-8">
|
2019-02-14 13:14:44 +01:00
|
|
|
<app-multiple-auto-complete [formControl]="formGroup.get('researchers')"
|
|
|
|
placeholder="{{'DMP-EDITOR.FIELDS.RESEARCHERS' | translate}}"
|
|
|
|
[configuration]="researchersAutoCompleteConfiguration">
|
2019-01-18 18:03:45 +01:00
|
|
|
</app-multiple-auto-complete>
|
2019-02-14 13:14:44 +01:00
|
|
|
<mat-error *ngIf="formGroup.get('researchers').hasError('backendError')">
|
|
|
|
{{formGroup.get('researchers').getError('backendError').message}}</mat-error>
|
|
|
|
<mat-error *ngIf="formGroup.get('researchers').hasError('required')">
|
|
|
|
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
2019-06-13 17:27:30 +02:00
|
|
|
<button matSuffix type="button" class="input-btn" (click)="addResearcher()">
|
|
|
|
<mat-icon class="icon-btn">add_circle</mat-icon>
|
2019-01-18 18:03:45 +01:00
|
|
|
</button>
|
|
|
|
</mat-form-field>
|
|
|
|
<mat-form-field class="col-md-6">
|
|
|
|
<input matInput placeholder="Version" formControlName="version">
|
|
|
|
<!--disabled doesn't work -->
|
|
|
|
</mat-form-field>
|
|
|
|
|
|
|
|
<mat-list class="col-md-12" *ngIf="associatedUsers?.length" role="list">
|
|
|
|
<h3 mat-subheader>Associated Users</h3>
|
|
|
|
<mat-list-item role="listitem" *ngFor="let user of associatedUsers">
|
|
|
|
<mat-icon mat-list-icon>person</mat-icon>
|
|
|
|
<div>{{user.name}}</div>
|
|
|
|
</mat-list-item>
|
|
|
|
</mat-list>
|
|
|
|
</div>
|
|
|
|
</mat-card-content>
|
|
|
|
</mat-card>
|
|
|
|
</form>
|
2019-04-02 12:45:47 +02:00
|
|
|
</div>
|