mirror of
				https://github.com/encode/django-rest-framework.git
				synced 2025-10-30 23:47:53 +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 | 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; | ||||||
|  | } | ||||||
|  |  | ||||||
|  | @ -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 %} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user