Opened 9 years ago

Closed 8 years ago

#2545 closed enhancement (worksforme)

[patch] Option to collapse fieldset if empty

Reported by: SmileyChris Owned by: nobody
Component: contrib.admin Version:
Severity: normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Collapsable FieldSets are cool. But I wanted them to be able to collapse only if the fields within the field set are blank.

Usage example:

    fields = (
        (None, {
            'fields': ('name', 'date')
        }),
        ('Extra info', {
            'classes': 'collapse collapse_empty',
            'fields' : ('note',)
        }),
    )

Attachments (2)

collapse_empty.patch (3.3 KB) - added by SmileyChris 9 years ago.
collapse_empty.2.patch (3.3 KB) - added by SmileyChris 9 years ago.
Oops, was mixed spaces and tabs. Now just spaces.

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by SmileyChris

Changed 9 years ago by SmileyChris

Oops, was mixed spaces and tabs. Now just spaces.

comment:1 Changed 8 years ago by SmileyChris

  • Triage Stage changed from Unreviewed to Design decision needed

comment:2 Changed 8 years ago by ubernostrum

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

This can be accomplished already with the js option in the current admin, and should be equally easy in newforms-admin.

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