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
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
7 deletions
+22
-7
rest_framework/static/rest_framework/css/bootstrap-tweaks.css
+14
-0
rest_framework/templates/rest_framework/horizontal/checkbox.html
+8
-7
No files found.
rest_framework/static/rest_framework/css/bootstrap-tweaks.css
View file @
f1e2135b
...
...
@@ -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
;
}
rest_framework/templates/rest_framework/horizontal/checkbox.html
View file @
f1e2135b
<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 %}
<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>
</div>
{% 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 %}
...
...
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