line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::FormHandler::Widget::Wrapper::SimpleInline; |
2
|
|
|
|
|
|
|
# ABSTRACT: simple field wrapper |
3
|
|
|
|
|
|
|
$HTML::FormHandler::Widget::Wrapper::SimpleInline::VERSION = '0.40067'; |
4
|
1
|
|
|
1
|
|
530
|
use Moose::Role; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
6
|
|
5
|
1
|
|
|
1
|
|
3102
|
use namespace::autoclean; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
with 'HTML::FormHandler::Widget::Wrapper::Base'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub wrap_field { |
11
|
1
|
|
|
1
|
0
|
2
|
my ( $self, $result, $rendered_widget ) = @_; |
12
|
|
|
|
|
|
|
|
13
|
1
|
50
|
|
|
|
4
|
return $rendered_widget if $self->has_flag('is_compound'); |
14
|
|
|
|
|
|
|
|
15
|
0
|
|
|
|
|
|
my $output = "\n"; |
16
|
0
|
|
|
|
|
|
my $tag = $self->wrapper_tag; |
17
|
0
|
|
|
|
|
|
my $start_tag = $self->get_tag('wrapper_start'); |
18
|
0
|
0
|
|
|
|
|
if( defined $start_tag ) { |
19
|
0
|
|
|
|
|
|
$output .= $start_tag; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
else { |
22
|
0
|
|
|
|
|
|
$output .= "<$tag" . process_attrs( $self->wrapper_attributes($result) ) . ">"; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
0
|
0
|
0
|
|
|
|
if ( $self->do_label && length( $self->label ) > 0 ) { |
26
|
0
|
|
|
|
|
|
$output .= $self->do_render_label($result); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
|
|
|
$output .= $rendered_widget; |
30
|
|
|
|
|
|
|
$output .= qq{\n<span class="error_message">$_</span>} |
31
|
0
|
|
|
|
|
|
for $result->all_errors; |
32
|
|
|
|
|
|
|
|
33
|
0
|
|
|
|
|
|
my $end_tag = $self->get_tag('wrapper_end'); |
34
|
0
|
0
|
|
|
|
|
$output .= defined $end_tag ? $end_tag : "</$tag>"; |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
return "$output\n"; |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
1; |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
__END__ |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=pod |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=encoding UTF-8 |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 NAME |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
HTML::FormHandler::Widget::Wrapper::SimpleInline - simple field wrapper |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 VERSION |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
version 0.40067 |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 SYNOPSIS |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
This works like the Simple Wrapper, except it doesn't wrap Compound |
58
|
|
|
|
|
|
|
fields. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 AUTHOR |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
FormHandler Contributors - see HTML::FormHandler |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
This software is copyright (c) 2016 by Gerda Shank. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
69
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=cut |