Opened 24 hours ago

Last modified 23 hours ago

#36069 assigned Bug

The position of the "X" button for the InlineForm in TabularInline differs depending on the can_delete value.

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

Description

class CommentInline(admin.TabularInline):
    model = Comment
    extra = 1
    can_delete = False

class TagInline(admin.TabularInline):
    model = Tag
    extra = 1


class PostAdmin(admin.ModelAdmin):
    inlines = [CommentInline, TagInline]

When can_delete is set to False in TabularInline, remove button of the InlineForm moves to the bottom (it should be at the top originally).

Attachments (1)

tabular_inline_delete_button.png (39.7 KB ) - added by Antoliny 24 hours ago.

Download all attachments as: .zip

Change History (6)

by Antoliny, 24 hours ago

comment:1 by Antoliny, 24 hours ago

Owner: set to Antoliny
Status: newassigned

comment:2 by Antoliny, 24 hours ago

Summary: When can_delete is set to False in TabularInline, the position of the remove (X) button for the InlineForm is different.The position of the "X" button for the InlineForm in TabularInline differs depending on the can_delete value.

comment:3 by Antoliny, 24 hours ago

Has patch: set

comment:5 by Natalia Bidart, 23 hours ago

Triage Stage: UnreviewedAccepted

Thank you Antoliny! I reproduced in latest main, accepting.

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