Fixes funder selection preview as mandatory in DMP (Issue #182)

This commit is contained in:
apapachristou 2019-11-04 12:50:45 +02:00
parent ca16a26f56
commit 916728bb1f
2 changed files with 4 additions and 3 deletions

View File

@ -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);
}

View File

@ -5,7 +5,7 @@
<div class="row">
<div class="col-6 pb-2 pl-4 pt-4" *ngIf="!isCreateNewFunder">
<mat-form-field>
<app-single-auto-complete [formControl]="funderFormGroup.get('existFunder')" placeholder="{{'DMP-EDITOR.FIELDS.FUNDER' | translate}}" [configuration]="funderAutoCompleteConfiguration">
<app-single-auto-complete required='true' [formControl]="funderFormGroup.get('existFunder')" placeholder="{{'DMP-EDITOR.FIELDS.FUNDER' | translate}}" [configuration]="funderAutoCompleteConfiguration">
</app-single-auto-complete>
<mat-hint>{{'DMP-EDITOR.FIELDS.EXTERNAL-SOURCE-HINT' | translate}}</mat-hint>
</mat-form-field>