From 916728bb1fc148224d801a3338ac9886dfecc637 Mon Sep 17 00:00:00 2001 From: apapachristou Date: Mon, 4 Nov 2019 12:50:45 +0200 Subject: [PATCH] Fixes funder selection preview as mandatory in DMP (Issue #182) --- dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.ts | 5 +++-- .../src/app/ui/dmp/editor/grant-tab/grant-tab.component.html | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.ts b/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.ts index 15dbe087f..4f01c3b24 100644 --- a/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.ts +++ b/dmp-frontend/src/app/ui/dmp/editor/dmp-editor.component.ts @@ -1,7 +1,7 @@ -import {of as observableOf, Observable } from 'rxjs'; +import { of as observableOf, Observable } from 'rxjs'; -import {map, takeUntil } from 'rxjs/operators'; +import { map, takeUntil } from 'rxjs/operators'; import { Component, OnInit } from '@angular/core'; import { FormGroup } from '@angular/forms'; import { MatDialog } from '@angular/material/dialog'; @@ -230,6 +230,7 @@ export class DmpEditorComponent extends BaseComponent implements OnInit, IBreadC public isFormValid() { return this.formGroup.get('label').valid && this.formGroup.get('profiles').valid && + (this.formGroup.get('funder').get('label').valid || this.formGroup.get('funder').get('existFunder').valid) && (this.formGroup.get('grant').get('label').valid || this.formGroup.get('grant').get('existGrant').valid); } diff --git a/dmp-frontend/src/app/ui/dmp/editor/grant-tab/grant-tab.component.html b/dmp-frontend/src/app/ui/dmp/editor/grant-tab/grant-tab.component.html index ce7eab906..e4f7ae5a2 100644 --- a/dmp-frontend/src/app/ui/dmp/editor/grant-tab/grant-tab.component.html +++ b/dmp-frontend/src/app/ui/dmp/editor/grant-tab/grant-tab.component.html @@ -5,7 +5,7 @@
- + {{'DMP-EDITOR.FIELDS.EXTERNAL-SOURCE-HINT' | translate}}