Opened 8 months ago

Last modified 5 weeks ago

#36053 assigned Bug

FilteredSelectMultiple label to the right of widget on a ModelMultipleChoiceField

Reported by: Harsh Malviya Owned by: Ahmed Nassar
Component: contrib.admin Version: 5.0
Severity: Normal Keywords: css, forms, widget, filter, selectmultiple, django, admin
Cc: Antoliny Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: yes UI/UX: yes

Description

Description:
I am using a django forms widget FilteredSelectMultiple, It seems the CSS for the same is not on the right place. It's showing the label of the widget to the right side.

P.S. This is only happening in the Django Versions >= 5.0, For lower versions than 5.0 it's working fine i.e Django==4.2.17

Code Snippet:

from django import forms
from models import Address
from django.contrib.admin.widgets import FilteredSelectMultiple

class UserForm(forms.ModelForm):
    address = forms.ModelMultipleChoiceField(
        queryset= Address.objects.all(),
        widget=FilteredSelectMultiple("Address", is_stacked=False),
        required=False
    )

Please check the attached images for different versions:

Requisite:
Django Version: 5.1.4
Python Version: 3.11.10
Operating System: macOS
Django Installation Method: pip install Django

Attachments (2)

image.png (66.9 KB ) - added by Harsh Malviya 8 months ago.
image.2.png (66.3 KB ) - added by Harsh Malviya 8 months ago.

Download all attachments as: .zip

Change History (19)

by Harsh Malviya, 8 months ago

Attachment: image.png added

by Harsh Malviya, 8 months ago

Attachment: image.2.png added

comment:1 by Chaitanya Rahalkar, 8 months ago

Owner: set to Chaitanya Rahalkar
Status: newassigned

comment:2 by Sarah Boyce, 8 months ago

Component: Formscontrib.admin
Summary: Django Admin Widget FilteredSelectMultiple CSS Not WorkingFilteredSelectMultiple label to the right of widget on a ModelMultipleChoiceField
Triage Stage: UnreviewedAccepted

Replicated, thank you for the report!

comment:3 by Sarah Boyce, 8 months ago

Version: 5.15.0

comment:4 by Andrew Graham-Yooll, 7 months ago

Hey Chaitanya Rahalkar! Any progress on this issue? If not, Id be happy to take this one on if you are unable to. Thanks, Andrew

comment:5 by Andrew Graham-Yooll, 7 months ago

Owner: changed from Chaitanya Rahalkar to Andrew Graham-Yooll

comment:6 by Andrew Graham-Yooll, 7 months ago

Has patch: set

comment:7 by Sarah Boyce, 7 months ago

Patch needs improvement: set

comment:8 by Clifford Mapesa, 5 months ago

Hello, I would love to work on this

comment:9 by Ahmed Nassar, 5 months ago

Hi, I'd be happy to address this ticket. Due to the owner's inactivity, I will reassign it to myself and send my PR addressing this ticket.

Last edited 5 months ago by Ahmed Nassar (previous) (diff)

comment:10 by Ahmed Nassar, 5 months ago

Owner: changed from Andrew Graham-Yooll to Ahmed Nassar

comment:11 by Ahmed Nassar, 5 months ago

Patch needs improvement: unset
Last edited 5 months ago by Ahmed Nassar (previous) (diff)

comment:12 by Fabian Braun, 4 months ago

Triage Stage: AcceptedReady for checkin

comment:13 by Sarah Boyce, 4 months ago

Needs tests: set
Triage Stage: Ready for checkinAccepted

comment:14 by Ahmed Nassar, 4 months ago

Needs tests: unset

comment:15 by Sarah Boyce, 4 months ago

Patch needs improvement: set

comment:16 by Sarah Boyce, 3 months ago

#35353 was a duplicate

comment:17 by Antoliny, 5 weeks ago

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