Disables buttons "Next" on DMP Wizard if required fields are empty

This commit is contained in:
apapachristou 2019-08-29 11:09:47 +03:00
parent 5d1d1e36d7
commit 9081ccadfe
3 changed files with 5 additions and 5 deletions

View File

@ -36,7 +36,7 @@ export class FunderFormModel {
baseContext.validation.push({ key: 'id', validators: [] });
baseContext.validation.push({ key: 'label', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'label')] });
baseContext.validation.push({ key: 'status', validators: [] });
baseContext.validation.push({ key: 'existFunder', validators: [Validators.required, ValidJsonValidator, BackendErrorValidator(this.validationErrorModel, 'existFunder')] });
baseContext.validation.push({ key: 'existFunder', validators: [BackendErrorValidator(this.validationErrorModel, 'existFunder')] });
return baseContext;
}

View File

@ -31,7 +31,6 @@ export class DmpEditorWizardComponent extends BaseComponent implements OnInit, I
@Input() formGroup: FormGroup;
@Input() dmpLabel: string;
@Input() datasetFormGroup: FormGroup;
//formGroup: FormGroup = null;
private uiNotificationService: UiNotificationService
profilesAutoCompleteConfiguration: SingleAutoCompleteConfiguration;

View File

@ -18,7 +18,7 @@
<app-quick-wizard-project-editor-component class="col-12" [formGroup]="formGroup.get('project')"></app-quick-wizard-project-editor-component>
</div>
<div class="navigation-buttons-container">
<button style="float:right;" matStepperNext mat-raised-button color="primary">{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.ACTIONS.NEXT' | translate}}</button>
<button class="float-right" [disabled]="formGroup.get('grant').invalid" matStepperNext mat-raised-button color="primary">{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.ACTIONS.NEXT' | translate}}</button>
</div>
</mat-step>
<mat-step [stepControl]="formGroup.get('dmp')">
@ -32,8 +32,9 @@
</div>
<div class="navigation-buttons-container">
<button matStepperPrevious mat-raised-button color="primary">{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.ACTIONS.BACK' | translate}}</button>
<button style="float:right;" matStepperNext mat-raised-button color="primary">
{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.ACTIONS.NEXT' | translate}}</button>
<button class="float-right" [disabled]="this.formGroup.get('dmp').get('datasetProfile').invalid" matStepperNext mat-raised-button color="primary">
{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.ACTIONS.NEXT' | translate}}
</button>
</div>
</ng-container>
</mat-step>