mirror of https://github.com/snachodog/mybuddy.git
Use custom control for checkboxes.
This commit is contained in:
parent
01868fe249
commit
119f4182e5
|
@ -7,14 +7,13 @@
|
||||||
</label>
|
</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-10">
|
||||||
{% if field|field_type == "booleanfield" %}
|
{% if field|field_type == "booleanfield" %}
|
||||||
<div class="form-check">
|
<div class="custom-control custom-checkbox">
|
||||||
<label for="id_{{ field.name }}" class="form-check-label"></label>
|
|
||||||
{% if field.errors %}
|
{% if field.errors %}
|
||||||
{{ field|add_class:"form-check-input is-invalid" }}
|
{{ field|add_class:"custom-control-input is-invalid" }}
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ field|add_class:"form-check-input" }}
|
{{ field|add_class:"custom-control-input" }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{{ field.label }}
|
<label for="id_{{ field.name }}" class="custom-control-label">{{ field.label }}</label>
|
||||||
</div>
|
</div>
|
||||||
{% elif field|field_type == "datetimefield" or field|field_type == "datefield" %}
|
{% elif field|field_type == "datetimefield" or field|field_type == "datefield" %}
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
|
|
Loading…
Reference in New Issue