mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-01-25 00:34:21 +03:00
Fixes vertical html layout for BooleanField
`HTMLFormRenderer` renders `BooleanField` field as not checked if vertical layout are used.
This commit is contained in:
parent
a3f513c83c
commit
59ab3a291c
|
@ -1,7 +1,7 @@
|
|||
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="{{ field.name }}" value="true" {% if value %}checked{% endif %}>
|
||||
<input type="checkbox" name="{{ field.name }}" value="true" {% if field.value %}checked{% endif %}>
|
||||
{% if field.label %}{{ field.label }}{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue
Block a user