﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
25495	CheckboxSelectMultiple cannot set CSS class of UL	Tom van Dijk	nobody	"It would be nice to be able to override (or actually: set) the class of the <ul> tag of a CheckboxSelectMultiple.
Attributes of this tag cannot be set at the moment.

Example code that I now use to ""hack"" the class into the <ul>. The example code is used in the context of mezzanine/grappelli, which provides a nice CSS with ul.checkboxlist that works well for admin pages.

{{{
class CheckboxSelectMultipleRenderer(CheckboxFieldRenderer):
    def render(self):
        result = super(CheckboxSelectMultipleRenderer, self).render()
        return mark_safe(re.sub(""<ul id"", '<ul class=""checkboxlist"" id', result, count=1))


class CheckboxSelectMultipleCss(CheckboxSelectMultiple):
    renderer = CheckboxSelectMultipleRenderer
}}}"	New feature	closed	Forms	1.7	Normal	wontfix			Unreviewed	0	0	0	0	0	0
