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
This commit is contained in:
Jacob Kaplan-Moss 2008-09-02 19:25:27 +00:00
parent e997a1c3df
commit 7a9b55ddc4
4 changed files with 7 additions and 7 deletions

View File

@ -9,7 +9,6 @@ form .form-row p { padding-left:0; font-size:11px; }
/* FORM LABELS */ /* FORM LABELS */
form h4 { margin:0 !important; padding:0 !important; border:none !important; } form h4 { margin:0 !important; padding:0 !important; border:none !important; }
label { font-weight:normal !important; color:#666; font-size:12px; } label { font-weight:normal !important; color:#666; font-size:12px; }
label.inline { margin-left:20px; }
.required label, label.required { font-weight:bold !important; color:#333 !important; } .required label, label.required { font-weight:bold !important; color:#333 !important; }
/* RADIO BUTTONS */ /* RADIO BUTTONS */
@ -19,8 +18,7 @@ form ul.inline { margin-left:0; padding:0; }
form ul.inline li { float:left; padding-right:7px; } form ul.inline li { float:left; padding-right:7px; }
/* ALIGNED FIELDSETS */ /* ALIGNED FIELDSETS */
.aligned label { display:block; padding:0 1em 3px 0; float:left; width:8em; } .aligned label { display:block; padding:3px 10px 0 0; float:left; width:8em; }
.aligned label.inline { display:inline; float:none; }
.colMS .aligned .vLargeTextField, .colMS .aligned .vXMLLargeTextField { width:350px; } .colMS .aligned .vLargeTextField, .colMS .aligned .vXMLLargeTextField { width:350px; }
form .aligned p, form .aligned ul { margin-left:7em; padding-left:30px; } form .aligned p, form .aligned ul { margin-left:7em; padding-left:30px; }
form .aligned table p { margin-left:0; padding-left:0; } form .aligned table p { margin-left:0; padding-left:0; }
@ -28,6 +26,7 @@ form .aligned p.help { padding-left:38px; }
.aligned .vCheckboxLabel { float:none !important; display:inline; padding-left:4px; } .aligned .vCheckboxLabel { float:none !important; display:inline; padding-left:4px; }
.colM .aligned .vLargeTextField, .colM .aligned .vXMLLargeTextField { width:610px; } .colM .aligned .vLargeTextField, .colM .aligned .vXMLLargeTextField { width:610px; }
.checkbox-row p.help { margin-left:0; padding-left:0 !important; } .checkbox-row p.help { margin-left:0; padding-left:0 !important; }
fieldset .field-box { float:left; margin-right: 20px; }
/* WIDE FIELDSETS */ /* WIDE FIELDSETS */
.wide label { width:15em !important; } .wide label { width:15em !important; }
@ -60,10 +59,11 @@ fieldset.monospace textarea { font-family:"Bitstream Vera Sans Mono",Monaco,"Cou
.module table .vPositiveSmallIntegerField { width:2.2em; } .module table .vPositiveSmallIntegerField { width:2.2em; }
.vTextField { width:20em; } .vTextField { width:20em; }
.vIntegerField { width:5em; } .vIntegerField { width:5em; }
.vForeignKeyRawIdAdminField { width: 5em; }
/* x unsorted */ /* INLINES */
.inline-group {padding:0; border:1px solid #ccc; margin:10px 0;} .inline-group {padding:0; border:1px solid #ccc; margin:10px 0;}
.inline-group .aligned label { width: 7em; } .inline-group .aligned label { width: 8em; }
.inline-related {position:relative;} .inline-related {position:relative;}
.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;} .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;}

View File

@ -38,6 +38,7 @@ div.breadcrumbs { text-align:right; }
.vDateField, .vTimeField { margin-left:2px; } .vDateField, .vTimeField { margin-left:2px; }
form ul.inline li { float:right; padding-right:0; padding-left:7px; } form ul.inline li { float:right; padding-right:0; padding-left:7px; }
input[type=submit].default, .submit-row input.default { float:left; } input[type=submit].default, .submit-row input.default { float:left; }
fieldset .field-box { float:right; margin-left: 20px; }
/* widget styles */ /* widget styles */
.calendarnav-previous { top:0; left:auto; right:0; } .calendarnav-previous { top:0; left:auto; right:0; }

View File

@ -33,7 +33,6 @@ a.selector-clearall { background:url(../img/admin/selector-removeall.gif) left c
/* DATE AND TIME */ /* DATE AND TIME */
p.datetime { line-height:20px; margin:0; padding:0; color:#666; font-size:11px; font-weight:bold; } p.datetime { line-height:20px; margin:0; padding:0; color:#666; font-size:11px; font-weight:bold; }
.datetime span { font-size:11px; color:#ccc; font-weight:normal; white-space:nowrap; } .datetime span { font-size:11px; color:#ccc; font-weight:normal; white-space:nowrap; }
.vDateField { margin-left:4px; }
table p.datetime { font-size:10px; margin-left:0; padding-left:0; } table p.datetime { font-size:10px; margin-left:0; padding-left:0; }
/* FILE UPLOADS */ /* FILE UPLOADS */

View File

@ -5,7 +5,7 @@
<div class="form-row{% if line.errors %} errors{% endif %} {% for field in line %}{{ field.field.name }} {% endfor %} "> <div class="form-row{% if line.errors %} errors{% endif %} {% for field in line %}{{ field.field.name }} {% endfor %} ">
{{ line.errors }} {{ line.errors }}
{% for field in line %} {% for field in line %}
<div class="float-left"> <div{% if not line.fields|length_is:"1" %} class="field-box"{% endif %}>
{% if field.is_checkbox %} {% if field.is_checkbox %}
{{ field.field }}{{ field.label_tag }} {{ field.field }}{{ field.label_tag }}
{% else %} {% else %}