﻿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
28060	Add the horizontal radio selection renderer	Musen	Musen	"I propose to add the render for horizontal radio selection. When a set of choices is rendered into a radio selection list, Django will list the radio selection vertically by default. People come to trouble when they want to make the radio list horizontal. 

I propose to add a Horizontal radio selection render that is similar to
{{{
from django.utils.safestring import mark_safe

class HorizontalRadioRenderer(forms.RadioSelect.renderer):
  def render(self):
    return mark_safe(u'\n'.join([u'%s\n' % w for w in self]))


class ApprovalForm(forms.Form):
    approval = forms.ChoiceField(choices=APPROVAL_CHOICES,
                 initial=0,
                 widget=forms.RadioSelect(renderer=HorizontalRadioRenderer),
                                 )
}}}

This could as solve ticket #28059.

PS. The code for `HorizontalRadioRenderer` seems to be a folklore on the internet for years, it can be found on *[http://stackoverflow.com/questions/5935546/align-radio-buttons-horizontally-in-django-forms stackoverflow] and *[https://wikis.utexas.edu/display/~bm6432/Django-Modifying+RadioSelect+Widget+to+have+horizontal+buttons UTexas Wiki].
"	New feature	closed	Forms	dev	Normal	wontfix			Unreviewed	0	1	1	0	0	0
