Makes disabled checks more secure
This commit is contained in:
parent
9d284e8060
commit
9ef7f7cb40
|
@ -84,7 +84,7 @@
|
||||||
<app-dataset-external-references-editor-component [formGroup]="formGroup" [viewOnly]="viewOnly"></app-dataset-external-references-editor-component>
|
<app-dataset-external-references-editor-component [formGroup]="formGroup" [viewOnly]="viewOnly"></app-dataset-external-references-editor-component>
|
||||||
</form>
|
</form>
|
||||||
</mat-tab>
|
</mat-tab>
|
||||||
<mat-tab [disabled]="isNew && (formGroup.get('profile').disabled || formGroup.get('profile').invalid)">
|
<mat-tab [disabled]="isNew && (formGroup.get('profile').disabled || !(formGroup.get('profile').valid))">
|
||||||
<ng-template mat-tab-label>
|
<ng-template mat-tab-label>
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<mat-icon class="mr-2">library_books</mat-icon>
|
<mat-icon class="mr-2">library_books</mat-icon>
|
||||||
|
|
|
@ -396,7 +396,7 @@ export class DatasetWizardComponent extends BaseComponent implements OnInit, IBr
|
||||||
public isSemiFormValid(formGroup: FormGroup): boolean {
|
public isSemiFormValid(formGroup: FormGroup): boolean {
|
||||||
var isValid: boolean = true;
|
var isValid: boolean = true;
|
||||||
Object.keys(formGroup.controls).forEach(controlName => {
|
Object.keys(formGroup.controls).forEach(controlName => {
|
||||||
if (controlName != 'datasetProfileDefinition' && formGroup.get(controlName).invalid) {
|
if (controlName != 'datasetProfileDefinition' && !(formGroup.get(controlName).valid)) {
|
||||||
isValid = false;
|
isValid = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
</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 class="float-right" [disabled]="this.formGroup.get('dmp').get('datasetProfile').invalid" matStepperNext mat-raised-button color="primary">
|
<button class="float-right" [disabled]="!(this.formGroup.get('dmp').get('datasetProfile').valid)" matStepperNext mat-raised-button color="primary">
|
||||||
{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.ACTIONS.NEXT' | translate}}
|
{{'QUICKWIZARD.CREATE-ADD.CREATE.QUICKWIZARD_CREATE.ACTIONS.NEXT' | translate}}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue