diff --git a/dmp-frontend/src/app/ui/dmp/editor/grant-tab/project-form-model.ts b/dmp-frontend/src/app/ui/dmp/editor/grant-tab/project-form-model.ts index 931cbcee5..15e46491a 100644 --- a/dmp-frontend/src/app/ui/dmp/editor/grant-tab/project-form-model.ts +++ b/dmp-frontend/src/app/ui/dmp/editor/grant-tab/project-form-model.ts @@ -39,7 +39,7 @@ export class ProjectFormModel { baseContext.validation.push({ key: 'label', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'label')] }); baseContext.validation.push({ key: 'status', validators: [] }); baseContext.validation.push({ key: 'description', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'description')] }); - baseContext.validation.push({ key: 'existProject', validators: [Validators.required, ValidJsonValidator, BackendErrorValidator(this.validationErrorModel, 'existProject')] }); + baseContext.validation.push({ key: 'existProject', validators: [BackendErrorValidator(this.validationErrorModel, 'existProject')] }); return baseContext; } diff --git a/dmp-frontend/src/app/ui/quick-wizard/funder-editor/funder-editor-wizard.component.html b/dmp-frontend/src/app/ui/quick-wizard/funder-editor/funder-editor-wizard.component.html index 0cd02edc1..b36d0a087 100644 --- a/dmp-frontend/src/app/ui/quick-wizard/funder-editor/funder-editor-wizard.component.html +++ b/dmp-frontend/src/app/ui/quick-wizard/funder-editor/funder-editor-wizard.component.html @@ -8,10 +8,6 @@ - - {{formGroup.get('existFunder').getError('backendError').message}} - - {{'GENERAL.VALIDATION.REQUIRED' | translate}} diff --git a/dmp-frontend/src/app/ui/quick-wizard/project-editor/project-editor-wizard.component.html b/dmp-frontend/src/app/ui/quick-wizard/project-editor/project-editor-wizard.component.html index 96fbf5ed2..b53fb7f43 100644 --- a/dmp-frontend/src/app/ui/quick-wizard/project-editor/project-editor-wizard.component.html +++ b/dmp-frontend/src/app/ui/quick-wizard/project-editor/project-editor-wizard.component.html @@ -9,10 +9,6 @@ - - {{formGroup.get('project').getError('backendError').message}} - - {{'GENERAL.VALIDATION.REQUIRED' | translate}} diff --git a/dmp-frontend/src/app/ui/quick-wizard/quick-wizard-editor/quick-wizard-editor.component.ts b/dmp-frontend/src/app/ui/quick-wizard/quick-wizard-editor/quick-wizard-editor.component.ts index 72231b778..fcaddc47f 100644 --- a/dmp-frontend/src/app/ui/quick-wizard/quick-wizard-editor/quick-wizard-editor.component.ts +++ b/dmp-frontend/src/app/ui/quick-wizard/quick-wizard-editor/quick-wizard-editor.component.ts @@ -20,6 +20,7 @@ import { DatasetEditorWizardComponent } from '../dataset-editor/dataset-editor-w import { GrantEditorWizardModel } from '../grant-editor/grant-editor-wizard-model'; import { QuickWizardEditorWizardModel } from './quick-wizard-editor.model'; import { FunderFormModel } from '../../dmp/editor/grant-tab/funder-form-model'; +import { ProjectFormModel } from '../../dmp/editor/grant-tab/project-form-model'; @Component({ selector: 'app-quick-wizard-editor-component', @@ -53,6 +54,7 @@ export class QuickWizardEditorComponent extends BaseComponent implements OnInit, this.quickWizard = new QuickWizardEditorWizardModel(); this.quickWizard.grant = new GrantEditorWizardModel(); this.quickWizard.funder = new FunderFormModel(); + this.quickWizard.project = new ProjectFormModel(); this.formGroup = this.quickWizard.buildForm(); this.language.get('NAV-BAR.DMP-WIZARD').pipe(takeUntil(this._destroyed)).subscribe(x => { this.breadCrumbs = Observable.of([ @@ -125,7 +127,7 @@ export class QuickWizardEditorComponent extends BaseComponent implements OnInit, } public isFormValid() { - return this.formGroup.valid; + return this.formGroup.get('grant').valid; } public touchAllFormFields(formControl: AbstractControl) {