mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-05 13:00:12 +03:00
A little tricky change
Also unchecked field can be updated.
This commit is contained in:
parent
1823662e1e
commit
e131389c1a
|
@ -1,6 +1,7 @@
|
||||||
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
||||||
<div class="checkbox">
|
<div class="checkbox">
|
||||||
<label>
|
<label>
|
||||||
|
<input type="hidden" name="{{ field.name }}" value="false">
|
||||||
<input type="checkbox" name="{{ field.name }}" value="true" {% if field.value %}checked{% endif %}>
|
<input type="checkbox" name="{{ field.name }}" value="true" {% if field.value %}checked{% endif %}>
|
||||||
{% if field.label %}{{ field.label }}{% endif %}
|
{% if field.label %}{{ field.label }}{% endif %}
|
||||||
</label>
|
</label>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user