aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2020-07-10 23:55:46 +0100
committerrubenwardy <rw@rubenwardy.com>2020-07-10 23:55:46 +0100
commit6150447c858249d48289ddd25141d7ac401982e9 (patch)
tree1d0d439ad7dd0defb5febe99bbfeb06a8754f39d
parentdd86fb0e14fa2c290b8cfa81418580f42062400f (diff)
downloadcheatdb-6150447c858249d48289ddd25141d7ac401982e9.tar.xz
Fix bootstrap toggle button not matching backing radio button
-rw-r--r--app/templates/macros/forms.html2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/templates/macros/forms.html b/app/templates/macros/forms.html
index d28199e..9c56a48 100644
--- a/app/templates/macros/forms.html
+++ b/app/templates/macros/forms.html
@@ -136,7 +136,7 @@
{% macro render_toggle_field(field, icons=[]) -%}
<div class="btn-group btn-group-toggle" data-toggle="buttons">
{% for value, label, checked in field.iter_choices() %}
- <label class="btn btn-primary">
+ <label class="btn btn-primary{% if checked %} active{% endif %}">
{% set icon = icons[value] %}
{% if icon %}
<i class="fas {{ icon }} mr-2"></i>