line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::FormHandler::Widget::Field::Textarea; |
2
|
|
|
|
|
|
|
# ABSTRACT: textarea rendering widget |
3
|
|
|
|
|
|
|
$HTML::FormHandler::Widget::Field::Textarea::VERSION = '0.40067'; |
4
|
8
|
|
|
8
|
|
5369
|
use Moose::Role; |
|
8
|
|
|
|
|
12
|
|
|
8
|
|
|
|
|
72
|
|
5
|
8
|
|
|
8
|
|
29372
|
use namespace::autoclean; |
|
8
|
|
|
|
|
14
|
|
|
8
|
|
|
|
|
73
|
|
6
|
8
|
|
|
8
|
|
520
|
use HTML::FormHandler::Render::Util ('process_attrs'); |
|
8
|
|
|
|
|
10
|
|
|
8
|
|
|
|
|
66
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub render_element { |
9
|
12
|
|
|
12
|
0
|
22
|
my $self = shift; |
10
|
12
|
|
33
|
|
|
37
|
my $result = shift || $self->result; |
11
|
|
|
|
|
|
|
|
12
|
12
|
|
|
|
|
40
|
my $fif = $self->html_filter($result->fif); |
13
|
12
|
|
|
|
|
294
|
my $id = $self->id; |
14
|
12
|
|
100
|
|
|
341
|
my $cols = $self->cols || 10; |
15
|
12
|
|
100
|
|
|
338
|
my $rows = $self->rows || 5; |
16
|
12
|
|
|
|
|
299
|
my $name = $self->html_name; |
17
|
12
|
|
|
|
|
83
|
my $output = |
18
|
|
|
|
|
|
|
qq(<textarea name="$name" id="$id") |
19
|
|
|
|
|
|
|
. process_attrs($self->element_attributes($result)) |
20
|
|
|
|
|
|
|
. qq( rows="$rows" cols="$cols">$fif</textarea>); |
21
|
12
|
|
|
|
|
37
|
return $output; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub render { |
25
|
12
|
|
|
12
|
0
|
21
|
my ( $self, $result ) = @_; |
26
|
12
|
|
66
|
|
|
129
|
$result ||= $self->result; |
27
|
12
|
50
|
|
|
|
35
|
die "No result for form field '" . $self->full_name . "'. Field may be inactive." unless $result; |
28
|
12
|
|
|
|
|
45
|
my $output = $self->render_element( $result ); |
29
|
12
|
|
|
|
|
49
|
return $self->wrap_field( $result, $output ); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
__END__ |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=pod |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=encoding UTF-8 |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 NAME |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
HTML::FormHandler::Widget::Field::Textarea - textarea rendering widget |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 VERSION |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
version 0.40067 |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 AUTHOR |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
FormHandler Contributors - see HTML::FormHandler |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
This software is copyright (c) 2016 by Gerda Shank. |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
57
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=cut |