Fixed #11656: Thingy: Select list fields are not sorted properly

This commit is contained in:
khenn 2010-06-17 12:30:22 -05:00
parent cca5daed60
commit ef31678b7f
3 changed files with 6 additions and 19 deletions

View file

@ -1,5 +1,6 @@
7.9.8
- fixed #11651: First Day of Week is a string...
- fixed #11656: Thingy: Select list fields are not sorted properly
7.9.7
- added #11571: Allow return from photo edit view to gallery edit view

View file

@ -1049,20 +1049,8 @@ sub getFormPlugin {
eval { WebGUI::Pluggable::load($class) };
if ($class->isa('WebGUI::Form::List')) {
delete $param{size};
my $values = WebGUI::Operation::Shared::secureEval($session,$data->{possibleValues});
if (ref $values eq 'HASH') {
$param{options} = $values;
}
else{
my %options;
tie %options, 'Tie::IxHash';
foreach (split(/\n/x, $data->{possibleValues})) {
s/\s+$//x; # remove trailing spaces
$options{$_} = $_;
}
$param{options} = \%options;
}
$param{options} = $values;
}
if ($data->{fieldType} eq "YesNo") {

View file

@ -584,14 +584,12 @@ you wish to appear, one per line. <br />
<br />If you want a different label for a value, the possible values list has to be
formatted as follows:
<pre>
&#123;
"key1"=>"value1",
"key2"=>"value2",
"key3"=>"value3"
key1|value1
key2|value2
key3|value3
...
&#125;
</pre>
Braces, quotes and all. You simply replace "key1"/"value1" with your own name/value pairs},
Simply replace "key1"/"value1" with your own name/value pairs},
lastUpdated => 1223372150,
},