Disables buttons "Next" on DMP Wizard if required fields are empty
This commit is contained in:
parent
5d1d1e36d7
commit
9081ccadfe
|
@ -36,7 +36,7 @@ export class FunderFormModel {
|
||||||
baseContext.validation.push({ key: 'id', validators: [] });
|
baseContext.validation.push({ key: 'id', validators: [] });
|
||||||
baseContext.validation.push({ key: 'label', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'label')] });
|
baseContext.validation.push({ key: 'label', validators: [Validators.required, BackendErrorValidator(this.validationErrorModel, 'label')] });
|
||||||
baseContext.validation.push({ key: 'status', validators: [] });
|
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;
|
return baseContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,6 @@ export class DmpEditorWizardComponent extends BaseComponent implements OnInit, I
|
||||||
@Input() formGroup: FormGroup;
|
@Input() formGroup: FormGroup;
|
||||||
@Input() dmpLabel: string;
|
@Input() dmpLabel: string;
|
||||||
@Input() datasetFormGroup: FormGroup;
|
@Input() datasetFormGroup: FormGroup;
|
||||||
//formGroup: FormGroup = null;
|
|
||||||
private uiNotificationService: UiNotificationService
|
private uiNotificationService: UiNotificationService
|
||||||
|
|
||||||
profilesAutoCompleteConfiguration: SingleAutoCompleteConfiguration;
|
profilesAutoCompleteConfiguration: SingleAutoCompleteConfiguration;
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
<app-quick-wizard-project-editor-component class="col-12" [formGroup]="formGroup.get('project')"></app-quick-wizard-project-editor-component>
|
<app-quick-wizard-project-editor-component class="col-12" [formGroup]="formGroup.get('project')"></app-quick-wizard-project-editor-component>
|
||||||
</div>
|
</div>
|
||||||
<div class="navigation-buttons-container">
|
<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>
|
</div>
|
||||||
</mat-step>
|
</mat-step>
|
||||||
<mat-step [stepControl]="formGroup.get('dmp')">
|
<mat-step [stepControl]="formGroup.get('dmp')">
|
||||||
|
@ -32,8 +32,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="navigation-buttons-container">
|
<div class="navigation-buttons-container">
|
||||||
<button matStepperPrevious mat-raised-button color="primary">{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.ACTIONS.BACK' | translate}}</button>
|
<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">
|
<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>
|
{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.ACTIONS.NEXT' | translate}}
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
</mat-step>
|
</mat-step>
|
||||||
|
|
Loading…
Reference in New Issue