Opened 18 years ago

Closed 17 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: no UI/UX: no

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

Download all attachments as: .zip

Change History (4)

by Chris Beaven, 18 years ago

Attachment: collapse_empty.patch added

by Chris Beaven, 18 years ago

Attachment: collapse_empty.2.patch added

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

comment:1 by Chris Beaven, 18 years ago

Triage Stage: UnreviewedDesign decision needed

comment:2 by James Bennett, 17 years ago

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