line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
########################################################################### |
3
|
|
|
|
|
|
|
# Copyright (c) Nate Wiger http://nateware.com. All Rights Reserved. |
4
|
|
|
|
|
|
|
# Please visit http://formbuilder.org for tutorials, support, and examples. |
5
|
|
|
|
|
|
|
########################################################################### |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# The majority of this module's methods (including new) are |
8
|
|
|
|
|
|
|
# inherited directly from ::base, since they involve things |
9
|
|
|
|
|
|
|
# which are common, such as parameter parsing. The only methods |
10
|
|
|
|
|
|
|
# that are individual to different fields are those that affect |
11
|
|
|
|
|
|
|
# the rendering, such as script() and tag() |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
package CGI::FormBuilder::Field::textarea; |
14
|
|
|
|
|
|
|
|
15
|
2
|
|
|
2
|
|
13
|
use strict; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
86
|
|
16
|
2
|
|
|
2
|
|
12
|
use warnings; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
77
|
|
17
|
2
|
|
|
2
|
|
9
|
no warnings 'uninitialized'; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
76
|
|
18
|
|
|
|
|
|
|
|
19
|
2
|
|
|
2
|
|
12
|
use CGI::FormBuilder::Util; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
348
|
|
20
|
2
|
|
|
2
|
|
808
|
use CGI::FormBuilder::Field::text; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
57
|
|
21
|
2
|
|
|
2
|
|
12
|
use base 'CGI::FormBuilder::Field::text'; |
|
2
|
|
|
|
|
6
|
|
|
2
|
|
|
|
|
9343
|
|
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
our $VERSION = '3.09'; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
*render = \&tag; |
27
|
|
|
|
|
|
|
sub tag { |
28
|
6
|
|
|
6
|
1
|
20
|
local $^W = 0; # -w sucks |
29
|
6
|
|
|
|
|
12
|
my $self = shift; |
30
|
6
|
|
|
|
|
36
|
my $attr = $self->attr; |
31
|
|
|
|
|
|
|
|
32
|
6
|
|
|
|
|
45
|
my $jspre = $self->{_form}->jsprefix; |
33
|
|
|
|
|
|
|
|
34
|
6
|
|
|
|
|
11
|
my $tag = ''; |
35
|
6
|
|
|
|
|
22
|
my @value = $self->tag_value; # sticky is different in |
36
|
|
|
|
|
|
|
|
37
|
6
|
|
|
|
|
14
|
delete $attr->{type}; # |
38
|
|
|
|
|
|
|
|
39
|
6
|
|
|
|
|
13
|
my $text = join "\n", @value; |
40
|
6
|
|
|
|
|
23
|
$tag .= htmltag('textarea', $attr) . escapehtml($text) . ''; |
41
|
|
|
|
|
|
|
|
42
|
6
|
|
|
|
|
31
|
debug 2, "$self->{name}: generated tag = $tag"; |
43
|
6
|
|
|
|
|
55
|
return $tag; # always return scalar tag |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
__END__ |