Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #2612: fixed display of admin `help_text` with multiple fields …

…on the same line. Thanks to Nathan Borror for the original patch, and jezdez for a little cleanup.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@8871 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 7a9b55ddc4d49775a696d1d34629ebbad2499fa3 1 parent e997a1c
Jacob Kaplan-Moss authored
10  django/contrib/admin/media/css/forms.css
@@ -9,7 +9,6 @@ form .form-row p { padding-left:0; font-size:11px; }
9 9
 /* FORM LABELS */
10 10
 form h4 { margin:0 !important; padding:0 !important; border:none !important; }
11 11
 label { font-weight:normal !important; color:#666; font-size:12px; }
12  
-label.inline { margin-left:20px; }
13 12
 .required label, label.required { font-weight:bold !important; color:#333 !important; }
14 13
 
15 14
 /* RADIO BUTTONS */
@@ -19,8 +18,7 @@ form ul.inline { margin-left:0; padding:0; }
19 18
 form ul.inline li { float:left; padding-right:7px; }
20 19
 
21 20
 /* ALIGNED FIELDSETS */
22  
-.aligned label { display:block; padding:0 1em 3px 0; float:left; width:8em; }
23  
-.aligned label.inline { display:inline; float:none; }
  21
+.aligned label { display:block; padding:3px 10px 0 0; float:left; width:8em; }
24 22
 .colMS .aligned .vLargeTextField, .colMS .aligned .vXMLLargeTextField { width:350px; }
25 23
 form .aligned p, form .aligned ul { margin-left:7em; padding-left:30px; }
26 24
 form .aligned table p { margin-left:0; padding-left:0; }
@@ -28,6 +26,7 @@ form .aligned p.help { padding-left:38px; }
28 26
 .aligned .vCheckboxLabel { float:none !important; display:inline; padding-left:4px; }
29 27
 .colM .aligned .vLargeTextField, .colM .aligned .vXMLLargeTextField { width:610px; }
30 28
 .checkbox-row p.help { margin-left:0; padding-left:0 !important; }
  29
+fieldset .field-box { float:left; margin-right: 20px; }
31 30
 
32 31
 /* WIDE FIELDSETS */
33 32
 .wide label { width:15em !important; }
@@ -60,10 +59,11 @@ fieldset.monospace textarea { font-family:"Bitstream Vera Sans Mono",Monaco,"Cou
60 59
 .module table .vPositiveSmallIntegerField { width:2.2em; }
61 60
 .vTextField { width:20em; }
62 61
 .vIntegerField { width:5em; }
  62
+.vForeignKeyRawIdAdminField { width: 5em; }
63 63
 
64  
-/* x unsorted */
  64
+/* INLINES */
65 65
 .inline-group {padding:0; border:1px solid #ccc; margin:10px 0;}
66  
-.inline-group .aligned label { width: 7em; }
  66
+.inline-group .aligned label { width: 8em; }
67 67
 
68 68
 .inline-related {position:relative;}
69 69
 .inline-related h3 {margin: 0; color:#666; padding:3px 5px; font-size:11px; background:#e1e1e1 url(../img/admin/nav-bg.gif) top left repeat-x; border-bottom:1px solid #ddd;}
1  django/contrib/admin/media/css/rtl.css
@@ -38,6 +38,7 @@ div.breadcrumbs { text-align:right; }
38 38
 .vDateField, .vTimeField { margin-left:2px; }
39 39
 form ul.inline li { float:right; padding-right:0; padding-left:7px; }
40 40
 input[type=submit].default, .submit-row input.default { float:left; }
  41
+fieldset .field-box { float:right; margin-left: 20px; }
41 42
 
42 43
 /* widget styles */
43 44
 .calendarnav-previous { top:0; left:auto; right:0; }
1  django/contrib/admin/media/css/widgets.css
@@ -33,7 +33,6 @@ a.selector-clearall { background:url(../img/admin/selector-removeall.gif) left c
33 33
 /* DATE AND TIME */
34 34
 p.datetime { line-height:20px; margin:0; padding:0; color:#666; font-size:11px; font-weight:bold; }
35 35
 .datetime span { font-size:11px; color:#ccc; font-weight:normal; white-space:nowrap; }
36  
-.vDateField { margin-left:4px; }
37 36
 table p.datetime { font-size:10px; margin-left:0; padding-left:0; }
38 37
 
39 38
 /* FILE UPLOADS */
2  django/contrib/admin/templates/admin/includes/fieldset.html
@@ -5,7 +5,7 @@
5 5
       <div class="form-row{% if line.errors %} errors{% endif %} {% for field in line %}{{ field.field.name }} {% endfor %} ">
6 6
       {{ line.errors }}
7 7
       {% for field in line %}
8  
-      <div class="float-left">
  8
+      <div{% if not line.fields|length_is:"1" %} class="field-box"{% endif %}>
9 9
           {% if field.is_checkbox %}
10 10
               {{ field.field }}{{ field.label_tag }}
11 11
           {% else %}

0 notes on commit 7a9b55d

Please sign in to comment.
Something went wrong with that request. Please try again.