Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
f1e2135b
Commit
f1e2135b
authored
Jul 27, 2015
by
Tom Christie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restyle horizontal checkbox. Closes #2783.
parent
798cd1a6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
9 deletions
+24
-9
rest_framework/static/rest_framework/css/bootstrap-tweaks.css
+15
-1
rest_framework/templates/rest_framework/horizontal/checkbox.html
+9
-8
No files found.
rest_framework/static/rest_framework/css/bootstrap-tweaks.css
View file @
f1e2135b
/*
/*
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 {
...
@@ -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
;
}
rest_framework/templates/rest_framework/horizontal/checkbox.html
View file @
f1e2135b
<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 %}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment