Fix bootstrap toggle button not matching backing radio button

This commit is contained in:
rubenwardy 2020-07-10 23:55:46 +01:00
parent dd86fb0e14
commit 6150447c85
1 changed files with 1 additions and 1 deletions

View File

@ -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>