Restyle horizontal checkbox. Closes #2783.

This commit is contained in:
Tom Christie 2015-07-27 13:11:24 +01:00
parent 798cd1a637
commit f1e2135b04
2 changed files with 24 additions and 9 deletions

View File

@ -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 It's separate from `style.css` so that it can be easily overridden by replacing
a single block in the template. a single block in the template.
@ -213,3 +213,17 @@ body a:hover {
.request-info { .request-info {
clear:both; 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;
}

View File

@ -1,11 +1,12 @@
<div class="form-group {% if field.errors %}has-error{% endif %}"> <div class="form-group horizontal-checkbox {% if field.errors %}has-error{% endif %}">
<div class="col-sm-offset-2 col-sm-10"> {% if field.label %}
<div class="checkbox"> <label class="col-sm-2 control-label {% if style.hide_label %}sr-only{% endif %}">
<label> {{ field.label }}
<input type="checkbox" name="{{ field.name }}" value="true" {% if field.value %}checked{% endif %}> </label>
{% if field.label %}{{ field.label }}{% endif %} {% endif %}
</label>
</div> <div class="col-sm-10">
<input type="checkbox" name="{{ field.name }}" value="true" {% if field.value %}checked{% endif %}>
{% if field.errors %} {% if field.errors %}
{% for error in field.errors %} {% for error in field.errors %}