Opened 16 years ago

Closed 16 years ago

Last modified 13 years ago

#7898 closed (fixed)

CollapsedFieldsets.js is not injected if 'collapse' used in admin.StackedInline admin classes

Reported by: dima.kozlov@… Owned by: nobody
Component: contrib.admin Version: 1.0-alpha
Severity: 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

Test case:

class InlineAdmin(admin.StackedInline):
    model = Inline
    fieldsets = (
        (None, {
            'fields': ('field0')
        }),
        ('Details', {
            'classes': ('collapse',),
            'fields': ('field1', 'field2', 'field3')
        })
    )

class MainAdmin(admin.ModelAdmin):
    model = Main
    inlines = [InlineAdmin]

HTML rendered correctly with all fieldsets and the second fieldset has class='collapse' but CollapsedFieldsets.js is not injected into the page so collapse functionality does not work.

Change History (3)

comment:1 by Brian Rosner, 16 years ago

milestone: 1.0 beta
Triage Stage: UnreviewedAccepted

comment:2 by Brian Rosner, 16 years ago

Resolution: fixed
Status: newclosed

(In [8057]) Fixed #7898 -- Moved formset media definition to a media property in InlineAdminFormSet display helper and added InlineAdminForm media at the same time. This now properly renders all media associated with the formset and its display helper children. Thanks dima.kozlov for the report.

comment:3 by Jacob, 13 years ago

milestone: 1.0 beta

Milestone 1.0 beta deleted

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