2019-05-28 09:49:09 +02:00
|
|
|
<div class="container-fluid">
|
2019-08-27 13:03:39 +02:00
|
|
|
<form *ngIf="grantformGroup" [formGroup]="grantformGroup">
|
2019-06-12 15:01:55 +02:00
|
|
|
|
2019-08-20 17:32:42 +02:00
|
|
|
<!-- Create New DMP Mode -->
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-6 pb-2 pl-4 pt-4" *ngIf="!isCreateNewFunder">
|
|
|
|
<mat-form-field>
|
2019-11-04 11:50:45 +01:00
|
|
|
<app-single-auto-complete required='true' [formControl]="funderFormGroup.get('existFunder')" placeholder="{{'DMP-EDITOR.FIELDS.FUNDER' | translate}}" [configuration]="funderAutoCompleteConfiguration">
|
2019-08-20 17:32:42 +02:00
|
|
|
</app-single-auto-complete>
|
2019-09-13 17:00:34 +02:00
|
|
|
<mat-hint>{{'DMP-EDITOR.FIELDS.EXTERNAL-SOURCE-HINT' | translate}}</mat-hint>
|
2019-08-20 17:32:42 +02:00
|
|
|
</mat-form-field>
|
2019-06-12 15:01:55 +02:00
|
|
|
</div>
|
2019-08-20 17:32:42 +02:00
|
|
|
|
|
|
|
<!-- Create New Funder -->
|
|
|
|
<div class="col-6 pl-4 pt-4" *ngIf="isCreateNewFunder">
|
|
|
|
<mat-form-field>
|
2019-08-26 16:29:57 +02:00
|
|
|
<input matInput placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.FIELDS.FUNDER-LABEL' | translate}}" type="text" name="label" [formControl]="funderFormGroup.get('label')" required>
|
|
|
|
<mat-error *ngIf="funderFormGroup.get('label').hasError('backendError')">
|
|
|
|
{{funderFormGroup.get('label').getError('backendError').message}}</mat-error>
|
|
|
|
<mat-error *ngIf="funderFormGroup.get('label').hasError('required')">
|
2019-08-20 17:32:42 +02:00
|
|
|
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Toggle Between Add Funder or Use Existing -->
|
|
|
|
<div class="col d-flex">
|
2020-01-07 17:17:21 +01:00
|
|
|
<div class="row" *ngIf="showToggleButton()">
|
2019-08-20 17:32:42 +02:00
|
|
|
<div class="col-12 add-entity" *ngIf="isCreateNewFunder" (click)="createFunder()">
|
|
|
|
<mat-icon>settings_backup_restore</mat-icon>
|
|
|
|
<span>{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.ACTIONS.EXIST-FUNDER' | translate}}</span>
|
|
|
|
</div>
|
2019-09-02 11:50:42 +02:00
|
|
|
<div class="col-12" [ngClass]="isNewVersion?'disabled-toggle':'add-entity'" *ngIf="!isCreateNewFunder" (click)="createFunder()">
|
2019-08-20 17:32:42 +02:00
|
|
|
<mat-icon>add</mat-icon>
|
|
|
|
<span>{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.ACTIONS.CREATE-NEW-FUNDER' | translate}}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-06-12 15:01:55 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Create New DMP Mode -->
|
2019-08-20 17:32:42 +02:00
|
|
|
<div class="row">
|
|
|
|
<div class="col-6 pb-2 pl-4 pt-4" *ngIf="!isCreateNew">
|
2019-06-12 15:01:55 +02:00
|
|
|
<mat-form-field>
|
2019-08-27 13:03:39 +02:00
|
|
|
<app-single-auto-complete required='true' [formControl]="grantformGroup.get('existGrant')" placeholder="{{'DMP-EDITOR.FIELDS.GRANT' | translate}}" [configuration]="grantAutoCompleteConfiguration">
|
2019-06-12 15:01:55 +02:00
|
|
|
</app-single-auto-complete>
|
2019-09-13 17:00:34 +02:00
|
|
|
<mat-hint>{{'DMP-EDITOR.FIELDS.EXTERNAL-SOURCE-HINT' | translate}}</mat-hint>
|
2019-06-12 15:01:55 +02:00
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
|
2019-08-20 17:32:42 +02:00
|
|
|
<!-- Create New Grant -->
|
|
|
|
<div class="col-6 pl-4 pt-4" *ngIf="isCreateNew">
|
|
|
|
<mat-form-field>
|
2019-08-27 13:03:39 +02:00
|
|
|
<input matInput placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.FIELDS.GRANT-LABEL' | translate}}" type="text" name="label" [formControl]="grantformGroup.get('label')" required>
|
|
|
|
<mat-error *ngIf="grantformGroup.get('label').hasError('backendError')">
|
|
|
|
{{grantformGroup.get('label').getError('backendError').message}}</mat-error>
|
|
|
|
<mat-error *ngIf="grantformGroup.get('label').hasError('required')">
|
2019-06-12 15:01:55 +02:00
|
|
|
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
</mat-form-field>
|
2019-08-20 17:32:42 +02:00
|
|
|
<mat-form-field>
|
2020-02-06 10:31:43 +01:00
|
|
|
<textarea matInput class="description-area" placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.FIELDS.DESCRIPTION' | translate}}" [formControl]="grantformGroup.get('description')" [required]="true"></textarea>
|
|
|
|
<mat-error *ngIf="grantformGroup.get('description').hasError('backendError')">
|
|
|
|
{{projectFormGroup.get('description').getError('backendError').message}}</mat-error>
|
|
|
|
<mat-error *ngIf="grantformGroup.get('description').hasError('required')">
|
|
|
|
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
2019-06-12 15:01:55 +02:00
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
2019-08-20 17:32:42 +02:00
|
|
|
|
|
|
|
<!-- Toggle Between Add Grant or Use Existing -->
|
|
|
|
<div class="col d-flex">
|
2020-01-07 17:17:21 +01:00
|
|
|
<div class="row" *ngIf="showToggleButton()">
|
2019-09-02 10:19:16 +02:00
|
|
|
<div class="col-12 add-entity" *ngIf="isCreateNew" (click)="createGrant()">
|
2019-08-20 17:32:42 +02:00
|
|
|
<mat-icon>settings_backup_restore</mat-icon>
|
2019-08-28 15:53:17 +02:00
|
|
|
<span>{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.ACTIONS.EXIST-GRANT' | translate}}</span>
|
2019-08-20 17:32:42 +02:00
|
|
|
</div>
|
2019-10-04 11:16:59 +02:00
|
|
|
<div class="col-12" [ngClass]="isNewVersion || isGrantDisabled()?'disabled-toggle':'add-entity'" *ngIf="!isCreateNew" (click)="createGrant()">
|
2019-08-20 17:32:42 +02:00
|
|
|
<mat-icon>add</mat-icon>
|
2019-08-28 15:53:17 +02:00
|
|
|
<span>{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.ACTIONS.CREATE-NEW-GRANT' | translate}}</span>
|
2019-08-20 17:32:42 +02:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="row">
|
|
|
|
<div class="col-6 pb-2 pl-4 pt-4" *ngIf="!isCreateNewProject">
|
|
|
|
<mat-form-field>
|
|
|
|
<app-single-auto-complete [formControl]="projectFormGroup.get('existProject')" placeholder="{{'DMP-EDITOR.FIELDS.PROJECT' | translate}}" [configuration]="projectAutoCompleteConfiguration">
|
|
|
|
</app-single-auto-complete>
|
2019-09-13 17:00:34 +02:00
|
|
|
<mat-hint>{{'DMP-EDITOR.FIELDS.EXTERNAL-SOURCE-HINT' | translate}}</mat-hint>
|
2019-08-20 17:32:42 +02:00
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Create New Project -->
|
|
|
|
<div class="col-6 pb-4 pl-4 pt-4" *ngIf="isCreateNewProject">
|
|
|
|
<mat-form-field>
|
2020-02-06 10:31:43 +01:00
|
|
|
<input matInput placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.FIELDS.PROJECT-LABEL' | translate}}" type="text" name="label" [formControl]="projectFormGroup.get('label')" required>
|
2019-08-20 17:32:42 +02:00
|
|
|
<mat-error *ngIf="projectFormGroup.get('label').hasError('backendError')">
|
2019-08-27 13:03:39 +02:00
|
|
|
{{projectFormGroup.get('label').getError('backendError').message}}</mat-error>
|
2019-08-20 17:32:42 +02:00
|
|
|
<mat-error *ngIf="projectFormGroup.get('label').hasError('required')">
|
|
|
|
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
</mat-form-field>
|
|
|
|
<mat-form-field>
|
2020-02-06 10:31:43 +01:00
|
|
|
<textarea matInput class="description-area" placeholder="{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.FIRST-STEP.FIELDS.DESCRIPTION' | translate}}" [formControl]="projectFormGroup.get('description')" [required]="true"></textarea>
|
2019-08-20 17:32:42 +02:00
|
|
|
<mat-error *ngIf="projectFormGroup.get('description').hasError('backendError')">
|
2019-08-27 13:03:39 +02:00
|
|
|
{{projectFormGroup.get('description').getError('backendError').message}}</mat-error>
|
2019-08-20 17:32:42 +02:00
|
|
|
<mat-error *ngIf="projectFormGroup.get('description').hasError('required')">
|
|
|
|
{{'GENERAL.VALIDATION.REQUIRED' | translate}}</mat-error>
|
|
|
|
</mat-form-field>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- Toggle Between Add Project or Use Existing -->
|
|
|
|
<div class="col d-flex">
|
2020-01-07 17:17:21 +01:00
|
|
|
<div class="row" *ngIf="showToggleButton()">
|
2019-08-20 17:32:42 +02:00
|
|
|
<div class="col-12 add-entity" *ngIf="isCreateNewProject" (click)="createProject()">
|
|
|
|
<mat-icon>settings_backup_restore</mat-icon>
|
|
|
|
<span>{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.ACTIONS.EXIST-PROJECT' | translate}}</span>
|
|
|
|
</div>
|
2019-09-02 11:50:42 +02:00
|
|
|
<div class="col-12" [ngClass]="isNewVersion?'disabled-toggle':'add-entity'" *ngIf="!isCreateNewProject" (click)="createProject()">
|
2019-08-20 17:32:42 +02:00
|
|
|
<mat-icon>add</mat-icon>
|
|
|
|
<span>{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.ACTIONS.CREATE-NEW-PROJECT' | translate}}</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2019-06-12 15:01:55 +02:00
|
|
|
</div>
|
2019-08-20 17:32:42 +02:00
|
|
|
<!-- <app-dynamic-fields-grant [formGroup]="formGroup"></app-dynamic-fields-grant> -->
|
2019-06-12 15:01:55 +02:00
|
|
|
</form>
|
2019-05-28 09:49:09 +02:00
|
|
|
</div>
|