mirror of
				https://github.com/encode/django-rest-framework.git
				synced 2025-10-31 16:07:38 +03:00 
			
		
		
		
	Restyle horizontal checkbox. Closes #2783.
This commit is contained in:
		
							parent
							
								
									798cd1a637
								
							
						
					
					
						commit
						f1e2135b04
					
				|  | @ -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 %} | ||||
| <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 %} | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user