Replace new getValueFromPost with original. Checked that
Posts have all values (username, dateSubmitted, dateUpdated) defined.
This commit is contained in:
parent
53a1475c4b
commit
fadb77822e
3 changed files with 38 additions and 12 deletions
|
|
@ -86,6 +86,24 @@ sub definition {
|
|||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getValueFromPost ( )
|
||||
|
||||
Retrieves a value from a form GET or POST and returns it. If the value comes back as undef, this method will return the defaultValue instead. Note, this is exactly the same method as used by Control since SelectBoxes only support a single value.
|
||||
|
||||
=cut
|
||||
|
||||
sub getValueFromPost {
|
||||
my $self = shift;
|
||||
my $formValue = $session{req}->param($self->{name});
|
||||
if (defined $formValue) {
|
||||
return $formValue;
|
||||
} else {
|
||||
return $self->{defaultValue};
|
||||
}
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 toHtml ( )
|
||||
|
||||
Renders a select list form control.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue