Opened 18 years ago

Closed 18 years ago

#3596 closed (fixed)

Labels not positioned correctly in Admin

Reported by: anonymous Owned by: Adrian Holovaty
Component: contrib.admin Version: dev
Severity: Keywords:
Cc: treborhudson@…, brooks.travis@… Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

After changeset 4590 (patch from ticket #2205), labels don't seem to show up correctly in the admin app. Specifically, it seems that all the text-field labels in a row after the first are floated to the left underneath the row.

Change History (7)

comment:1 by matt <matt.barry@…>, 18 years ago

Whoops.. tried to upload some screenshots, but Trac doesn't seem to care for them:

TypeError: PgQuoteString() argument 1 must be string without null bytes, not str

comment:2 by Gary Wilson <gary.wilson@…>, 18 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Rob Hudson <treborhudson@…>, 18 years ago

Cc: treborhudson@… added

Can you describe your Admin options that shows the UI problem?

comment:4 by matt <matt.barry@…>, 18 years ago

It is trivially reproducible: this models.py reproduces the problem for me.

from django.db import models

class testmodel(models.Model):
    first = models.CharField(maxlength=10)
    second = models.CharField(maxlength=10)
    third = models.CharField(maxlength=10)
    class Admin:
        fields = (
            (None, {
                'fields' : (
                    ('first','second','third'),
                    )}),
        )

On the change form for testmodel, the labels for second and third are floated below and to the left. Which is what I expect, based on the CSS (the label for first does not receive the "inline" class). It seems to me that the patch from revision 4590 (#2205) should be reverted; the "inline" class should probably not be applied to edit_inline STACKED labels at all.

comment:5 by brooks.travis@…, 18 years ago

Cc: brooks.travis@… added

I'm experiencing this problem as well. Here's a link to a screenshot: http://homepage.mac.com/brooks_lt/odd_display.png

Here's the relevant code in my model:

fields = (
			(None, {
				'fields': (('first_name', 'middle_name', 'last_name'), ('gender', 'ssn', 'birth_date'), 'birth_place', ('home_address', 'home_city', 'home_state', 'home_zip', 'home_county'), ('phone', 'email'), ('secondary_contact', 'secondary_contact_relationship'),)
			}),
		)

comment:6 by Rob Hudson <treborhudson@…>, 18 years ago

Yeah, that's definitely worse than the view you get with bug 2205. I agree Changeset 4590 should be reverted and bug 2205 should be re-opened.

comment:7 by Jacob, 18 years ago

Resolution: fixed
Status: newclosed

(In [4652]) Reverted [4590] (changes to field label CSS) since it caused more problems than it created. Fixes #3596 and reopens #2205.

Note: See TracTickets for help on using tickets.
Back to Top