Skip to content

Commit

Permalink
Item11928: revert Item11666 change to default radio and checkboxes
Browse files Browse the repository at this point in the history
see http://trac.foswiki.org/changeset/14449



git-svn-id: http://svn.foswiki.org/trunk@15654 0b4bb1d4-4e5a-0410-9cc4-b2b747904278
  • Loading branch information
MichaelDaum authored and MichaelDaum committed Oct 22, 2012
1 parent b7801ba commit 43fac2c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
6 changes: 0 additions & 6 deletions core/lib/Foswiki/Form/Radio.pm
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ sub finish {
undef $this->{valueMap};
}

# From System.DataForms, "The first item in the list for a select or
# radio type is the default item."
sub getDefaultValue {
return shift->getOptions()->[0];
}

sub getOptions {
my $this = shift;

Expand Down
7 changes: 4 additions & 3 deletions core/lib/Foswiki/Form/Select.pm
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ sub new {
=begin TML
---++ getDefaultValue() -> $value
From System.DataForms, "The first item in the list for a select or
radio type is the default item."
The default for a select is always the empty string, as there is no way in
Foswiki form definitions to indicate selected values. This defers the decision
on a value to the browser.
=cut

sub getDefaultValue {
return shift->getOptions()->[0];
return '';
}

sub getOptions {
Expand Down

0 comments on commit 43fac2c

Please sign in to comment.