Added a color picker form field type.
This commit is contained in:
parent
0ab11cae6f
commit
83cbfc0d25
7 changed files with 333 additions and 361 deletions
|
|
@ -36,6 +36,7 @@ This package helps in the processing of the form variables that are returned fro
|
|||
$value = WebGUI::FormProcessor::checkbox("whichOne");
|
||||
$value = WebGUI::FormProcessor::checkList("dayOfWeek");
|
||||
$value = WebGUI::FormProcessor::codearea("snippet");
|
||||
$value = WebGUI::FormProcessor::color("highlightColor");
|
||||
$value = WebGUI::FormProcessor::combo("fruit");
|
||||
$value = WebGUI::FormProcessor::contentType("text");
|
||||
$value = WebGUI::FormProcessor::date("endDate");
|
||||
|
|
@ -140,6 +141,25 @@ sub codearea {
|
|||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 color ( name )
|
||||
|
||||
Returns a hex color string like: #000000
|
||||
|
||||
=head3 name
|
||||
|
||||
The name of the form variable to retrieve.
|
||||
|
||||
=cut
|
||||
|
||||
sub color {
|
||||
my $color = $session{form}{$_[0]};
|
||||
return undef unless $color =~ /\#\w{6}/;
|
||||
return $color;
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 combo ( name )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue