Skip to content

Commit

Permalink
Modified: removed bool_switch fields from label bolding (#300)
Browse files Browse the repository at this point in the history
  • Loading branch information
signebedi committed Jul 1, 2024
1 parent 7ced511 commit a25479a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions libreforms_fastapi/app/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,8 @@ body {
color: #ff5733;
}

/* Make the form labels pop a little more */
label.form-check-label {
/* Make the form labels pop a little more, excluding bool_switch fields */
label.form-check-label:not(.bool-switch-label) {
font-weight: bold;
/* font-size: 1.15em; */
}
2 changes: 1 addition & 1 deletion libreforms_fastapi/utils/pydantic_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ def get_form_html(
<span id="{description_id}" class="form-text"> {' Required.' if required else ''} {description_text} {tooltip_text}</span>
<div class="form-check form-switch bool-switch">
<input class="form-check-input bool-switch-checkbox" type="checkbox" name="{field_name}" id="{field_name}" {field_params} onchange="updateLabel(this, '{true_label}', '{false_label}')" {'checked' if is_true else ''} />
<label class="form-check-label" for="{field_name}">{true_label if is_true else false_label}</label>
<label class="form-check-label bool-switch-label" for="{field_name}">{true_label if is_true else false_label}</label>
</div>
</fieldset>'''

Expand Down

0 comments on commit a25479a

Please sign in to comment.