Layout can now uncheck all hidden assets. CheckList now has its own getValue which does not call getDefaultValue.
This commit is contained in:
parent
ad3c236f47
commit
a300ce8194
3 changed files with 41 additions and 0 deletions
|
|
@ -86,6 +86,41 @@ sub getName {
|
|||
return WebGUI::International->new($session, 'WebGUI')->get('941');
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getValue ( [ value ] )
|
||||
|
||||
Returns an array or a carriage return ("\n") separated scalar depending upon whether you're returning the values into an array or a scalar. Also parses the input values (wherever they come from) to see if it's a scalar then it splits on \n.
|
||||
|
||||
=head3 value
|
||||
|
||||
Optional values to process, instead of POST input.
|
||||
|
||||
=cut
|
||||
|
||||
sub getValue {
|
||||
my ($self, $value) = @_;
|
||||
my @values = ();
|
||||
if (defined $value) {
|
||||
if (ref $value eq "ARRAY") {
|
||||
@values = @{$value};
|
||||
}
|
||||
else {
|
||||
$value =~ s/\r//g;
|
||||
@values = split "\n", $value;
|
||||
}
|
||||
}
|
||||
if (scalar @values < 1 && $self->session->request) {
|
||||
my $value = $self->session->form->param($self->get("name"));
|
||||
if (defined $value) {
|
||||
@values = $self->session->form->param($self->get("name"));
|
||||
}
|
||||
}
|
||||
return wantarray ? @values : join("\n",@values);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getSelectAllButton ( )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue