line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::Widget::Element::Fieldset; |
2
|
|
|
|
|
|
|
|
3
|
88
|
|
|
88
|
|
98391
|
use warnings; |
|
88
|
|
|
|
|
348
|
|
|
88
|
|
|
|
|
2562
|
|
4
|
88
|
|
|
88
|
|
455
|
use strict; |
|
88
|
|
|
|
|
165
|
|
|
88
|
|
|
|
|
2812
|
|
5
|
88
|
|
|
88
|
|
440
|
use base 'HTML::Widget::Element::Block'; |
|
88
|
|
|
|
|
163
|
|
|
88
|
|
|
|
|
62927
|
|
6
|
88
|
|
|
88
|
|
556
|
use NEXT; |
|
88
|
|
|
|
|
180
|
|
|
88
|
|
|
|
|
401
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors('legend'); |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
HTML::Widget::Element::Fieldset - Fieldset Element |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 SYNOPSIS |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
my $fs = $widget->element( 'Fieldset', 'address' ); |
17
|
|
|
|
|
|
|
$fs->element( 'Textfield', 'street' ); |
18
|
|
|
|
|
|
|
$fs->element( 'Textfield', 'town' ); |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 DESCRIPTION |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
Fieldset Element. Container element creating a fieldset which can contain |
23
|
|
|
|
|
|
|
other Elements. |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 METHODS |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head2 new |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=cut |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub new { |
32
|
98
|
|
|
98
|
1
|
835
|
return shift->NEXT::new(@_)->type('fieldset')->class('widget_fieldset'); |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head2 legend |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Set a legend for this fieldset. |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=cut |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
sub _pre_content_elements { |
42
|
94
|
|
|
94
|
|
184
|
my ( $self, $w ) = @_; |
43
|
94
|
100
|
|
|
|
375
|
return () unless $self->legend; |
44
|
|
|
|
|
|
|
|
45
|
10
|
|
|
|
|
67
|
my %args; |
46
|
10
|
100
|
|
|
|
40
|
$args{id} = $self->id($w) . "_legend" if defined $self->name; |
47
|
10
|
|
|
|
|
50
|
my $l = HTML::Element->new( 'legend', %args ); |
48
|
|
|
|
|
|
|
|
49
|
10
|
|
|
|
|
272
|
$l->push_content( $self->legend ); |
50
|
10
|
|
|
|
|
403
|
return ($l); |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 SEE ALSO |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
L |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 AUTHOR |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Michael Gray, C |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 LICENSE |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
This library is free software, you can redistribute it and/or modify it under |
64
|
|
|
|
|
|
|
the same terms as Perl itself. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=cut |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
1; |