Skip to content
Snippets Groups Projects
Commit dd9bec59 authored by François Agneray's avatar François Agneray
Browse files

Fixed bug instance form documentation allowed

parent c0d71f1d
No related branches found
No related tags found
1 merge request!29Develop
<form [formGroup]="form" novalidate>
<accordion-group heading="Documentation">
<div class="custom-control custom-switch mb-2">
<input class="custom-control-input" type="checkbox" id="documentation_allowed" name="documentation_allowed" formControlName="documentation_allowed">
<input class="custom-control-input" type="checkbox" id="documentation_allowed" name="documentation_allowed" formControlName="documentation_allowed" (change)="checkDisableDocumentationAllowed()">
<label class="custom-control-label" for="documentation_allowed">Documentation allowed</label>
</div>
<div class="form-group">
......
......@@ -16,4 +16,12 @@ import { FormGroup } from '@angular/forms';
})
export class DocumentationFormGroupComponent {
@Input() form: FormGroup;
checkDisableDocumentationAllowed() {
if (this.form.controls.documentation_allowed.value) {
this.form.controls.documentation_label.enable();
} else {
this.form.controls.documentation_label.disable();
}
}
}
......@@ -75,7 +75,7 @@ the fast implementation of a project data exchange platform in a dedicated infor
if (this.searchFormGroup.controls.search_by_criteria_allowed.value) {
this.searchFormGroup.controls.search_by_criteria_label.enable();
}
if (this.documentationFormGroup.controls.documentation_allowed) {
if (this.documentationFormGroup.controls.documentation_allowed.value) {
this.documentationFormGroup.controls.documentation_label.enable();
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment