Fixed bug 725211
This commit is contained in:
parent
402d22e8c9
commit
af4efc0333
2 changed files with 6 additions and 4 deletions
|
|
@ -412,9 +412,10 @@ The name of the property to retrieve the value for.
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub getValue {
|
sub getValue {
|
||||||
|
my $currentValue = $_[0]->get($_[1]);
|
||||||
if (exists $session{form}{$_[1]}) {
|
if (exists $session{form}{$_[1]}) {
|
||||||
return $session{form}{$_[1]};
|
return $session{form}{$_[1]};
|
||||||
} elsif (defined $_[0]->get($_[1])) {
|
} elsif (defined $currentValue) {
|
||||||
return $_[0]->get($_[1]);
|
return $_[0]->get($_[1]);
|
||||||
} else {
|
} else {
|
||||||
return $_[0]->getDefaultValue($_[1]);
|
return $_[0]->getDefaultValue($_[1]);
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,8 @@ sub new {
|
||||||
},
|
},
|
||||||
question=>{},
|
question=>{},
|
||||||
randomizeAnswers=>{
|
randomizeAnswers=>{
|
||||||
defaultValue=>1
|
defaultValue=>1,
|
||||||
|
fieldType=>"yesNo"
|
||||||
},
|
},
|
||||||
a1=>{},
|
a1=>{},
|
||||||
a2=>{},
|
a2=>{},
|
||||||
|
|
@ -107,7 +108,7 @@ sub purge {
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
sub www_edit {
|
sub www_edit {
|
||||||
my ($i, $active, $voteGroup, $graphWidth, $answers, $randomizeAnswers);
|
my ($i, $answers);
|
||||||
for ($i=1; $i<=20; $i++) {
|
for ($i=1; $i<=20; $i++) {
|
||||||
if ($_[0]->get('a'.$i) =~ /\C/) {
|
if ($_[0]->get('a'.$i) =~ /\C/) {
|
||||||
$answers .= $_[0]->getValue("a".$i)."\n";
|
$answers .= $_[0]->getValue("a".$i)."\n";
|
||||||
|
|
@ -154,7 +155,7 @@ sub www_edit {
|
||||||
$layout->yesNo(
|
$layout->yesNo(
|
||||||
-name=>"randomizeAnswers",
|
-name=>"randomizeAnswers",
|
||||||
-label=>WebGUI::International::get(72,$_[0]->get("namespace")),
|
-label=>WebGUI::International::get(72,$_[0]->get("namespace")),
|
||||||
-value=>$randomizeAnswers
|
-value=>$_[0]->getValue("randomizeAnswers")
|
||||||
);
|
);
|
||||||
my $output = $_[0]->SUPER::www_edit(
|
my $output = $_[0]->SUPER::www_edit(
|
||||||
-layout=>$layout->printRowsOnly,
|
-layout=>$layout->printRowsOnly,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue