mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-10 19:56:59 +03:00
Restyle horizontal checkbox. Closes #2783.
This commit is contained in:
parent
798cd1a637
commit
f1e2135b04
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
|
||||
This CSS file contains some tweaks specific to the included Bootstrap theme.
|
||||
This CSS file contains some tweaks specific to the included Bootstrap theme.
|
||||
It's separate from `style.css` so that it can be easily overridden by replacing
|
||||
a single block in the template.
|
||||
|
||||
|
@ -213,3 +213,17 @@ body a:hover {
|
|||
.request-info {
|
||||
clear:both;
|
||||
}
|
||||
|
||||
.horizontal-checkbox label {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.horizontal-checkbox label {
|
||||
padding-top: 0 !important;
|
||||
}
|
||||
|
||||
.horizontal-checkbox input {
|
||||
float: left;
|
||||
width: 20px;
|
||||
margin-top: 3px;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,12 @@
|
|||
<div class="form-group {% if field.errors %}has-error{% endif %}">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="{{ field.name }}" value="true" {% if field.value %}checked{% endif %}>
|
||||
{% if field.label %}{{ field.label }}{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group horizontal-checkbox {% if field.errors %}has-error{% endif %}">
|
||||
{% if field.label %}
|
||||
<label class="col-sm-2 control-label {% if style.hide_label %}sr-only{% endif %}">
|
||||
{{ field.label }}
|
||||
</label>
|
||||
{% endif %}
|
||||
|
||||
<div class="col-sm-10">
|
||||
<input type="checkbox" name="{{ field.name }}" value="true" {% if field.value %}checked{% endif %}>
|
||||
|
||||
{% if field.errors %}
|
||||
{% for error in field.errors %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user