aboutsummaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/src/app/shared/components/formControls/component/checkbox
diff options
context:
space:
mode:
Diffstat (limited to 'vid-webpack-master/src/app/shared/components/formControls/component/checkbox')
-rw-r--r--vid-webpack-master/src/app/shared/components/formControls/component/checkbox/checkbox.formControl.component.html11
-rw-r--r--vid-webpack-master/src/app/shared/components/formControls/component/checkbox/checkbox.formControl.component.ts13
2 files changed, 24 insertions, 0 deletions
diff --git a/vid-webpack-master/src/app/shared/components/formControls/component/checkbox/checkbox.formControl.component.html b/vid-webpack-master/src/app/shared/components/formControls/component/checkbox/checkbox.formControl.component.html
new file mode 100644
index 000000000..26362ebed
--- /dev/null
+++ b/vid-webpack-master/src/app/shared/components/formControls/component/checkbox/checkbox.formControl.component.html
@@ -0,0 +1,11 @@
+<div class="details-item">
+ <input type="checkbox"
+ id="{{data?.dataTestId}}"
+ [attr.data-tests-id]="data?.dataTestId"
+ [checked]="data?.value"
+ name="{{data?.controlName}}"
+ [formControl]="form?.controls[data?.controlName]"
+ data-toggle="toggle">
+ <label class="checkbox-label"
+ for="{{data?.dataTestId}}">{{data?.displayName}}</label>
+</div>
diff --git a/vid-webpack-master/src/app/shared/components/formControls/component/checkbox/checkbox.formControl.component.ts b/vid-webpack-master/src/app/shared/components/formControls/component/checkbox/checkbox.formControl.component.ts
new file mode 100644
index 000000000..f9ba48308
--- /dev/null
+++ b/vid-webpack-master/src/app/shared/components/formControls/component/checkbox/checkbox.formControl.component.ts
@@ -0,0 +1,13 @@
+import {Component, Input} from "@angular/core";
+import {FormControlModel} from "../../../../models/formControlModels/formControl.model";
+import {FormGroup} from "@angular/forms";
+
+@Component({
+ selector: 'checkbox-form-control',
+ templateUrl: './checkbox.formControl.component.html'
+})
+export class CheckboxFormControlComponent{
+ @Input() data: FormControlModel;
+ @Input() form: FormGroup;
+
+}