From 7a9b55ddc4d49775a696d1d34629ebbad2499fa3 Mon Sep 17 00:00:00 2001 From: Jacob Kaplan-Moss Date: Tue, 2 Sep 2008 19:25:27 +0000 Subject: [PATCH] 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 --- django/contrib/admin/media/css/forms.css | 10 +++++----- django/contrib/admin/media/css/rtl.css | 1 + django/contrib/admin/media/css/widgets.css | 1 - .../admin/templates/admin/includes/fieldset.html | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/django/contrib/admin/media/css/forms.css b/django/contrib/admin/media/css/forms.css index 234a21ba79..21aadc9465 100644 --- a/django/contrib/admin/media/css/forms.css +++ b/django/contrib/admin/media/css/forms.css @@ -9,7 +9,6 @@ form .form-row p { padding-left:0; font-size:11px; } /* FORM LABELS */ form h4 { margin:0 !important; padding:0 !important; border:none !important; } 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; } /* RADIO BUTTONS */ @@ -19,8 +18,7 @@ form ul.inline { margin-left:0; padding:0; } form ul.inline li { float:left; padding-right:7px; } /* ALIGNED FIELDSETS */ -.aligned label { display:block; padding:0 1em 3px 0; float:left; width:8em; } -.aligned label.inline { display:inline; float:none; } +.aligned label { display:block; padding:3px 10px 0 0; float:left; width:8em; } .colMS .aligned .vLargeTextField, .colMS .aligned .vXMLLargeTextField { width:350px; } form .aligned p, form .aligned ul { margin-left:7em; padding-left:30px; } 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; } .colM .aligned .vLargeTextField, .colM .aligned .vXMLLargeTextField { width:610px; } .checkbox-row p.help { margin-left:0; padding-left:0 !important; } +fieldset .field-box { float:left; margin-right: 20px; } /* WIDE FIELDSETS */ .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; } .vTextField { width:20em; } .vIntegerField { width:5em; } +.vForeignKeyRawIdAdminField { width: 5em; } -/* x unsorted */ +/* INLINES */ .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 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;} diff --git a/django/contrib/admin/media/css/rtl.css b/django/contrib/admin/media/css/rtl.css index 900ddbd610..91053fa244 100644 --- a/django/contrib/admin/media/css/rtl.css +++ b/django/contrib/admin/media/css/rtl.css @@ -38,6 +38,7 @@ div.breadcrumbs { text-align:right; } .vDateField, .vTimeField { margin-left:2px; } form ul.inline li { float:right; padding-right:0; padding-left:7px; } input[type=submit].default, .submit-row input.default { float:left; } +fieldset .field-box { float:right; margin-left: 20px; } /* widget styles */ .calendarnav-previous { top:0; left:auto; right:0; } diff --git a/django/contrib/admin/media/css/widgets.css b/django/contrib/admin/media/css/widgets.css index 67d9662f3e..3686d1bb55 100644 --- a/django/contrib/admin/media/css/widgets.css +++ b/django/contrib/admin/media/css/widgets.css @@ -33,7 +33,6 @@ a.selector-clearall { background:url(../img/admin/selector-removeall.gif) left c /* DATE AND TIME */ 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; } -.vDateField { margin-left:4px; } table p.datetime { font-size:10px; margin-left:0; padding-left:0; } /* FILE UPLOADS */ diff --git a/django/contrib/admin/templates/admin/includes/fieldset.html b/django/contrib/admin/templates/admin/includes/fieldset.html index 26c918c051..8ee24b1898 100644 --- a/django/contrib/admin/templates/admin/includes/fieldset.html +++ b/django/contrib/admin/templates/admin/includes/fieldset.html @@ -5,7 +5,7 @@
{{ line.errors }} {% for field in line %} -
+ {% if field.is_checkbox %} {{ field.field }}{{ field.label_tag }} {% else %}