line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::FormHandler::Widget::Field::Hidden; |
2
|
|
|
|
|
|
|
# ABSTRACT: hidden field rendering widget |
3
|
|
|
|
|
|
|
$HTML::FormHandler::Widget::Field::Hidden::VERSION = '0.40067'; |
4
|
19
|
|
|
19
|
|
12883
|
use Moose::Role; |
|
19
|
|
|
|
|
29
|
|
|
19
|
|
|
|
|
171
|
|
5
|
19
|
|
|
19
|
|
71032
|
use HTML::FormHandler::Render::Util ('process_attrs'); |
|
19
|
|
|
|
|
30
|
|
|
19
|
|
|
|
|
166
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub render_element { |
9
|
21
|
|
|
21
|
0
|
37
|
my ( $self, $result ) = @_; |
10
|
21
|
|
33
|
|
|
57
|
$result ||= $self->result; |
11
|
|
|
|
|
|
|
|
12
|
21
|
|
|
|
|
51
|
my $output .= '<input type="hidden" name="'; |
13
|
21
|
|
|
|
|
578
|
$output .= $self->html_name . '"'; |
14
|
21
|
|
|
|
|
532
|
$output .= ' id="' . $self->id . '"'; |
15
|
21
|
|
|
|
|
100
|
$output .= ' value="' . $self->html_filter($result->fif) . '"'; |
16
|
21
|
|
|
|
|
122
|
$output .= process_attrs($self->element_attributes($result)); |
17
|
21
|
|
|
|
|
50
|
$output .= " />"; |
18
|
|
|
|
|
|
|
|
19
|
21
|
|
|
|
|
54
|
return $output; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub render { |
23
|
20
|
|
|
20
|
0
|
35
|
my ( $self, $result ) = @_; |
24
|
20
|
|
66
|
|
|
151
|
$result ||= $self->result; |
25
|
20
|
50
|
|
|
|
47
|
die "No result for form field '" . $self->full_name . "'. Field may be inactive." unless $result; |
26
|
20
|
|
|
|
|
89
|
my $output = $self->render_element( $result ); |
27
|
|
|
|
|
|
|
# wrap field unless do_label is set, which would cause unwanted |
28
|
|
|
|
|
|
|
# labels to be displayed |
29
|
20
|
50
|
|
|
|
681
|
return $self->wrap_field( $result, $output ) if !$self->do_label; |
30
|
0
|
|
|
|
|
|
return $output; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
19
|
|
|
19
|
|
5433
|
use namespace::autoclean; |
|
19
|
|
|
|
|
29
|
|
|
19
|
|
|
|
|
177
|
|
35
|
|
|
|
|
|
|
1; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
__END__ |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=pod |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=encoding UTF-8 |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 NAME |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
HTML::FormHandler::Widget::Field::Hidden - hidden field rendering widget |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 VERSION |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
version 0.40067 |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 SYNOPSIS |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Widget for rendering a hidden field. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 AUTHOR |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
FormHandler Contributors - see HTML::FormHandler |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
This software is copyright (c) 2016 by Gerda Shank. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
64
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=cut |