diff --git a/src/app/pages/forms/components/inputs/components/checkboxInputs/checkboxInputs.component.ts b/src/app/pages/forms/components/inputs/components/checkboxInputs/checkboxInputs.component.ts index 514ba808..55d8f6e5 100644 --- a/src/app/pages/forms/components/inputs/components/checkboxInputs/checkboxInputs.component.ts +++ b/src/app/pages/forms/components/inputs/components/checkboxInputs/checkboxInputs.component.ts @@ -1,10 +1,10 @@ import {Component} from '@angular/core'; -import {BaMultiCheckbox} from '../../../../../../theme/components'; +import {BaMultiCheckbox, BaCheckbox} from '../../../../../../theme/components'; @Component({ selector: 'checkbox-inputs', template: require('./checkboxInputs.html'), - directives: [BaMultiCheckbox] + directives: [BaMultiCheckbox, BaCheckbox] }) export class CheckboxInputs { public checkboxModel = [{ @@ -27,7 +27,7 @@ export class CheckboxInputs { label: 'name', baCheckboxClass: 'class' }; - + constructor() { } diff --git a/src/app/pages/forms/components/inputs/components/checkboxInputs/checkboxInputs.html b/src/app/pages/forms/components/inputs/components/checkboxInputs/checkboxInputs.html index e83f1c71..1acda5e6 100644 --- a/src/app/pages/forms/components/inputs/components/checkboxInputs/checkboxInputs.html +++ b/src/app/pages/forms/components/inputs/components/checkboxInputs/checkboxInputs.html @@ -24,9 +24,7 @@
-
- -
+
- +
diff --git a/src/app/pages/forms/components/layouts/components/horizontalForm/horizontalForm.component.ts b/src/app/pages/forms/components/layouts/components/horizontalForm/horizontalForm.component.ts index 4eec8323..d639fa30 100644 --- a/src/app/pages/forms/components/layouts/components/horizontalForm/horizontalForm.component.ts +++ b/src/app/pages/forms/components/layouts/components/horizontalForm/horizontalForm.component.ts @@ -1,7 +1,9 @@ import {Component} from '@angular/core'; +import {BaCheckbox} from '../../../../../../theme/components'; @Component({ selector: 'horizontal-form', + directives: [BaCheckbox], template: require('./horizontalForm.html'), }) export class HorizontalForm { diff --git a/src/app/pages/forms/components/layouts/components/horizontalForm/horizontalForm.html b/src/app/pages/forms/components/layouts/components/horizontalForm/horizontalForm.html index 1823aab1..cd3479c4 100644 --- a/src/app/pages/forms/components/layouts/components/horizontalForm/horizontalForm.html +++ b/src/app/pages/forms/components/layouts/components/horizontalForm/horizontalForm.html @@ -14,10 +14,7 @@
- +
diff --git a/src/app/pages/forms/components/layouts/components/inlineForm/inlineForm.component.ts b/src/app/pages/forms/components/layouts/components/inlineForm/inlineForm.component.ts index 029f4422..7d91cac8 100644 --- a/src/app/pages/forms/components/layouts/components/inlineForm/inlineForm.component.ts +++ b/src/app/pages/forms/components/layouts/components/inlineForm/inlineForm.component.ts @@ -1,11 +1,13 @@ import {Component} from '@angular/core'; +import {BaCheckbox} from '../../../../../../theme/components'; @Component({ selector: 'inline-form', + directives: [BaCheckbox], template: require('./inlineForm.html'), }) export class InlineForm { - + constructor() { } } diff --git a/src/app/pages/forms/components/layouts/components/inlineForm/inlineForm.html b/src/app/pages/forms/components/layouts/components/inlineForm/inlineForm.html index eb466ec1..aef1ec33 100644 --- a/src/app/pages/forms/components/layouts/components/inlineForm/inlineForm.html +++ b/src/app/pages/forms/components/layouts/components/inlineForm/inlineForm.html @@ -6,10 +6,7 @@
- +
diff --git a/src/app/theme/components/baCheckbox/baCheckbox.scss b/src/app/theme/components/baCheckbox/baCheckbox.scss index 69ae431b..13a0fffa 100644 --- a/src/app/theme/components/baCheckbox/baCheckbox.scss +++ b/src/app/theme/components/baCheckbox/baCheckbox.scss @@ -54,72 +54,6 @@ label.custom-checkbox > span { margin-right: 10px; } -label.custom-checkbox { - padding-right: 0; - padding-left: 0; - margin-bottom: 0; - & > input { - height: 0; - z-index: -100 !important; - opacity: 0; - position: absolute; - &:checked { - & + span { - &:before { - content: "\f00c"; - font-weight: $font-light; - } - } - } - &:disabled { - & + span { - color: $disabled; - cursor: not-allowed; - &:before { - border-color: $disabled !important; - cursor: not-allowed; - } - } - } - } - & > span { - position: relative; - display: inline-block; - margin: 0; - line-height: 16px; - font-weight: $font-light; - cursor: pointer; - padding-left: 22px; - width: 100%; - &:before { - cursor: pointer; - font-family: fontAwesome; - font-weight: $font-light; - font-size: 12px; - color: $content-text; - content: "\a0"; - background-color: transparent; - border: 1px solid $border; - border-radius: 0; - display: inline-block; - text-align: center; - height: 16px; - line-height: 14px; - min-width: 16px; - margin-right: 6px; - position: relative; - top: 0; - margin-left: -22px; - float: left; - } - &:hover { - &:before { - border-color: $primary-bg; - } - } - } -} - .form-horizontal { .checkbox, .checkbox-inline{ padding-top: 0; diff --git a/src/app/theme/sass/_form.scss b/src/app/theme/sass/_form.scss index bfc91b9a..5fb2f431 100644 --- a/src/app/theme/sass/_form.scss +++ b/src/app/theme/sass/_form.scss @@ -580,3 +580,69 @@ label.custom-input-danger { rating-inputs span { vertical-align: middle; } + +label.custom-checkbox { + padding-right: 0; + padding-left: 0; + margin-bottom: 0; + & > input { + height: 0; + z-index: -100 !important; + opacity: 0; + position: absolute; + &:checked { + & + span { + &:before { + content: "\f00c"; + font-weight: $font-light; + } + } + } + &:disabled { + & + span { + color: $disabled; + cursor: not-allowed; + &:before { + border-color: $disabled !important; + cursor: not-allowed; + } + } + } + } + & > span { + position: relative; + display: inline-block; + margin: 0; + line-height: 16px; + font-weight: $font-light; + cursor: pointer; + padding-left: 22px; + width: 100%; + &:before { + cursor: pointer; + font-family: fontAwesome; + font-weight: $font-light; + font-size: 12px; + color: $content-text; + content: "\a0"; + background-color: transparent; + border: 1px solid $border; + border-radius: 0; + display: inline-block; + text-align: center; + height: 16px; + line-height: 14px; + min-width: 16px; + margin-right: 6px; + position: relative; + top: 0; + margin-left: -22px; + float: left; + } + &:hover { + &:before { + border-color: $primary-bg; + } + } + } +}