[Html-widget] Patch for RadioGroup to support fieldsets
Carl Franks
fireartist at gmail.com
Fri Aug 4 17:21:37 CEST 2006
On 03/08/06, Michael Gray <mjg17 at eng.cam.ac.uk> wrote:
> I'm still struggling in my mind with HTML::Widget archictecture relating
> to full nested fieldset support.
>
> Meanwhile, this patch (which includes tests) provides an alternate
> rendering behaviour for HTML::Widget::Element::RadioGroup, putting the
> radio buttons into a <fieldset> with a <legend> for the label. From the
> docs:
>
> =head2 group_container
>
> Sets the container to be used for the radio group. Currently
> understands 'span' and 'fieldset'. 'span' is the default and
> replicates the previous behaviour. 'fieldset' puts the radio buttons
> into a fieldset with class 'radiogroup'. group_container() can be
> called as a class or instance method.
Michael,
I'm not sure whether this is the best approach, as it means adding yet
another 'elsif' for any other container types.
Regarding refactoring, etc...
I know sri spoke before about moving H::W to using Moose, so I'm going
to read all the Moose / Class::MOP docs this weekend, and see if I can
get my head round it all.
Hopefully I'll see why sri thought it would be a better base, and I'll
also see if it solves any of these issues such as overriding and
extending.
Carl
More information about the Html-widget
mailing list