Opened 10 years ago

Closed 9 years ago

#2545 closed enhancement (worksforme)

[patch] Option to collapse fieldset if empty

Reported by: Chris Beaven 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 Chris Beaven 10 years ago.
collapse_empty.2.patch (3.3 KB) - added by Chris Beaven 10 years ago.
Oops, was mixed spaces and tabs. Now just spaces.

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by Chris Beaven

Attachment: collapse_empty.patch added

Changed 10 years ago by Chris Beaven

Attachment: collapse_empty.2.patch added

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

comment:1 Changed 10 years ago by Chris Beaven

Triage Stage: UnreviewedDesign decision needed

comment:2 Changed 9 years ago by James Bennett

Resolution: worksforme
Status: newclosed

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