diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 94137b5eb..215965edd 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,4 +1,5 @@ 7.6.0 + - added fieldsets around form controls with multiple elements - rfe: Town Hall: Menu title in search results - rfe: Process Macros in HTTP Proxy's URL - rfe: TimeZone for the User Profiles displays incorrectly after installation diff --git a/lib/WebGUI/Form/CheckList.pm b/lib/WebGUI/Form/CheckList.pm index 6959081a8..3c6a9a4f7 100644 --- a/lib/WebGUI/Form/CheckList.pm +++ b/lib/WebGUI/Form/CheckList.pm @@ -137,7 +137,7 @@ Renders a series of checkboxes. sub toHtml { my $self = shift; - my $output; + my $output = '
"; return $output; } diff --git a/lib/WebGUI/Form/Radio.pm b/lib/WebGUI/Form/Radio.pm index e778c9933..9f18ce308 100644 --- a/lib/WebGUI/Form/Radio.pm +++ b/lib/WebGUI/Form/Radio.pm @@ -59,7 +59,10 @@ sub definition { push(@{$definition}, { checked=>{ defaultValue=> 0 - }, + }, + label => { + defaultValue => undef, + }, }); return $class->SUPER::definition($session, $definition); } @@ -99,12 +102,16 @@ Renders and input tag of type radio. =cut sub toHtml { - my$self = shift; + my $self = shift; my $value = $self->getOriginalValue(); $value = defined $value ? $self->fixMacros($self->fixQuotes($self->fixSpecialCharacters($value))) : ''; my $checkedText = $self->get("checked") ? ' checked="checked"' : ''; my $idText = $self->get('id') ? ' id="'.$self->get('id').'" ' : ''; - return 'get("extras")||'').' />'; + my $control = 'get("extras")||'').' />'; + if ($self->get('label')) { + return ""; + } + return $control; } diff --git a/lib/WebGUI/Form/RadioList.pm b/lib/WebGUI/Form/RadioList.pm index 6f9c891c4..5aadf0dde 100644 --- a/lib/WebGUI/Form/RadioList.pm +++ b/lib/WebGUI/Form/RadioList.pm @@ -143,7 +143,7 @@ Renders a series of radio buttons. sub toHtml { my $self = shift; - my $output; + my $output = '"; return $output; } diff --git a/lib/WebGUI/Form/YesNo.pm b/lib/WebGUI/Form/YesNo.pm index 2f334f72d..0ce827a9d 100644 --- a/lib/WebGUI/Form/YesNo.pm +++ b/lib/WebGUI/Form/YesNo.pm @@ -150,25 +150,28 @@ sub toHtml { my $i18n = WebGUI::International->new($self->session); my ($checkYes, $checkNo); if ($self->getOriginalValue) { - $checkYes = 1; + $checkYes = 1; } else { - $checkNo = 1; + $checkNo = 1; } - my $output = WebGUI::Form::Radio->new($self->session, - checked=>$checkYes, - name=>$self->get("name"), - value=>1, - extras=>$self->get("extras") - )->toHtml; - $output .= $i18n->get(138); - $output .= ' '; - $output .= WebGUI::Form::Radio->new($self->session, - checked=>$checkNo, - name=>$self->get("name"), - value=>0, - extras=>$self->get("extras") - )->toHtml; - $output .= $i18n->get(139); + my $output = '' + ; return $output; }