Skip to content

Commit 4659e46

Browse files
committed
fixed checkbox alignment
1 parent 605c07d commit 4659e46

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

static/sass/custom/_form.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,15 @@
2626
box-shadow: none !important;
2727
}
2828

29+
// fix border radius of fieldsets when last element in a row
30+
2931
.last-border {
3032
border-top-right-radius: var(--bs-border-radius) !important;
3133
border-bottom-right-radius: var(--bs-border-radius) !important;
34+
}
35+
36+
// add a dummy spacer to checkbox to align when validated
37+
38+
.was-validated .validation-spacer {
39+
display: block;
3240
}

templates/events/form.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,12 +80,14 @@ <h1>Create Event</h1>
8080
<!-- draft -->
8181
<div class="col-md-4">
8282
<!-- same height calculation as form-floating to stay same size -->
83-
<div class="input-group" style="height: calc(3.5rem + calc(var(--bs-border-width) * 2));">
83+
<div class="input-group has-validation" style="height: calc(3.5rem + var(--bs-border-width) * 2);">
8484
<div class="input-group-text">
8585
<input type="checkbox" name="draft" id="draft" class="form-check-input no-validate-checkbox">
8686
</div>
8787
<label for="draft" class="form-control d-flex align-items-center">Draft</label>
8888
</div>
89+
<!-- dummy spacer for aligning checkbox with every field -->
90+
<div class="valid-feedback invalid-feedback validation-spacer">&nbsp;</div>
8991
</div>
9092

9193
<!-- icon -->

0 commit comments

Comments
 (0)