Skip to content

Commit b970288

Browse files
authored
Merge pull request #823 from mgielecinski/adding-a-red-star-to-the-required-checkboxes
Adding a red asterisk to the required checkboxes
2 parents 17d2c18 + 1ed3cc9 commit b970288

File tree

3 files changed

+12
-1
lines changed

3 files changed

+12
-1
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
$component-name: form-check-label;
2+
3+
.#{$component-name} {
4+
&.required {
5+
&::before {
6+
color: var(--bs-danger);
7+
content: "*" / " ";
8+
}
9+
}
10+
}

src/scss/bootstrap/components/_index.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
@import "buttons";
55
@import "carousel";
66
@import "dropdown";
7+
@import "form-check";
78
@import "hr";
89
@import "labels";
910
@import "modal";

templates/_partials/form-fields.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
value="1" {if $field.value}checked="checked"{/if}
8484
{if $field.required}required{/if}
8585
>
86-
<label class="form-check-label" for="field-{$field.name}">
86+
<label class="form-check-label{if $field.required} required{/if}" for="field-{$field.name}">
8787
{$field.label nofilter}
8888
</label>
8989
</div>

0 commit comments

Comments
 (0)