Opened 8 years ago

Closed 8 years ago

Last modified 5 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: UI/UX:


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 Changed 8 years ago by brosner

  • milestone set to 1.0 beta
  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 8 years ago by brosner

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

(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 Changed 5 years ago by jacob

  • milestone 1.0 beta deleted

Milestone 1.0 beta deleted

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