line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::FormFu::Element::Fieldset; |
2
|
|
|
|
|
|
|
|
3
|
99
|
|
|
99
|
|
1163
|
use strict; |
|
99
|
|
|
|
|
110
|
|
|
99
|
|
|
|
|
3917
|
|
4
|
|
|
|
|
|
|
our $VERSION = '2.05'; # VERSION |
5
|
|
|
|
|
|
|
|
6
|
99
|
|
|
99
|
|
351
|
use Moose; |
|
99
|
|
|
|
|
103
|
|
|
99
|
|
|
|
|
635
|
|
7
|
|
|
|
|
|
|
extends 'HTML::FormFu::Element::Block'; |
8
|
|
|
|
|
|
|
|
9
|
99
|
|
|
99
|
|
482454
|
use HTML::FormFu::Util qw( xml_escape ); |
|
99
|
|
|
|
|
147
|
|
|
99
|
|
|
|
|
16718
|
|
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
__PACKAGE__->mk_output_accessors(qw( legend )); |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
__PACKAGE__->mk_attrs(qw( legend_attributes )); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
after BUILD => sub { |
16
|
|
|
|
|
|
|
my $self = shift; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
$self->tag('fieldset'); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
return; |
21
|
|
|
|
|
|
|
}; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub render_data_non_recursive { |
24
|
77
|
|
|
77
|
0
|
125
|
my ( $self, $args ) = @_; |
25
|
|
|
|
|
|
|
|
26
|
77
|
100
|
|
|
|
296
|
my $render = $self->SUPER::render_data_non_recursive( { |
27
|
|
|
|
|
|
|
legend => $self->legend, |
28
|
|
|
|
|
|
|
legend_attributes => xml_escape( $self->legend_attributes ), |
29
|
|
|
|
|
|
|
$args ? %$args : (), |
30
|
|
|
|
|
|
|
} ); |
31
|
|
|
|
|
|
|
|
32
|
77
|
|
|
|
|
203
|
return $render; |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
__END__ |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=head1 NAME |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
HTML::FormFu::Element::Fieldset - Fieldset element |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 VERSION |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
version 2.05 |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head1 SYNOPSIS |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
my $fs = $form->element( Fieldset => 'address' ); |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 DESCRIPTION |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
Fieldset element. |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 METHODS |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head2 legend |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
If L</legend> is set, it is used as the fieldset's legend |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head2 legend_loc |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
Arguments: $localization_key |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
To set the legend to a localized string, set L</legend_loc> to a key in |
68
|
|
|
|
|
|
|
your L10N file instead of using L</legend>. |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
=head1 SEE ALSO |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
Is a sub-class of, and inherits methods from |
73
|
|
|
|
|
|
|
L<HTML::FormFu::Element::Block>, |
74
|
|
|
|
|
|
|
L<HTML::FormFu::Element> |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
L<HTML::FormFu> |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
=head1 AUTHOR |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
Carl Franks, C<cfranks@cpan.org> |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 LICENSE |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
This library is free software, you can redistribute it and/or modify it under |
85
|
|
|
|
|
|
|
the same terms as Perl itself. |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
=cut |