Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#17978 closed Bug (fixed)

Minor layout issue when an inline contains a filter horizontal widget

Reported by: aaugustin Owned by: julien
Component: contrib.admin Version: 1.4
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Assuming these models:

from django.db import models

class Slave(models.Model):
    name = models.CharField(max_length=100)

class Master(models.Model):
    name = models.CharField(max_length=100)

class Apprentice(models.Model):
    name = models.CharField(max_length=100)
    master = models.OneToOneField(Master)
    slaves = models.ManyToManyField(Slave)

and this admin:

from django.contrib import admin
from .models import Apprentice, Master

class ApprenticeInline(admin.StackedInline):
    filter_horizontal = ('slaves',)
    model = Apprentice

class MasterAdmin(admin.ModelAdmin):
    inlines = (ApprenticeInline,)

admin.site.register(Master, MasterAdmin)

there's a small layout issue highlighted on the screenshot attached to this ticket.

The problem is caused by .inline-group .aligned label { with: 8em; } from forms.css overriding .selector .selector-filter label { width: 16px; } from widgets.css.

Attachments (1)

Screen Shot 2012-03-25 at 22.10.52.png (68.1 KB) - added by aaugustin 3 years ago.

Download all attachments as: .zip

Change History (4)

Changed 3 years ago by aaugustin

comment:1 Changed 3 years ago by anonymous

  • Owner changed from nobody to julien

comment:2 Changed 3 years ago by Julien Phalip <jphalip@…>

  • Resolution set to fixed
  • Status changed from new to closed

In [8015593bc1f2f226e7979bfdee8b7e88658d0e74]:

Fixed #17978 -- Fixed a minor layout issue when an inline contains a filter horizontal widget. Thanks to Aymeric Augustin for the report.

comment:3 Changed 3 years ago by Julien Phalip <jphalip@…>

In [9a2ca4266ad3a58af7db3ecbf9b99270519bb8f2]:

[1.4.x] Fixed #17978 -- Fixed a minor layout issue when an inline contains a filter horizontal widget. Thanks to Aymeric Augustin for the report.

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