Code

Opened 6 years ago

Closed 6 years ago

Last modified 3 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:

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.

Attachments (0)

Change History (3)

comment:1 Changed 6 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 6 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 3 years ago by jacob

  • milestone 1.0 beta deleted

Milestone 1.0 beta deleted

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.