line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::FormWidgets::RadioGroup; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
839
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
44
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
59
|
|
5
|
1
|
|
|
1
|
|
6
|
use parent 'HTML::FormWidgets'; |
|
1
|
|
|
|
|
6
|
|
|
1
|
|
|
|
|
7
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
__PACKAGE__->mk_accessors( qw( columns labels values ) ); |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub init { |
10
|
1
|
|
|
1
|
1
|
2
|
my ($self, $args) = @_; |
11
|
|
|
|
|
|
|
|
12
|
1
|
|
|
|
|
4
|
$self->columns( undef ); |
13
|
1
|
|
|
|
|
7
|
$self->labels ( undef ); |
14
|
1
|
|
|
|
|
7
|
$self->values ( [] ); |
15
|
1
|
|
|
|
|
5
|
return; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub render_field { |
19
|
1
|
|
|
1
|
1
|
2
|
my ($self, $args) = @_; my $hacc = $self->hacc; |
|
1
|
|
|
|
|
5
|
|
20
|
|
|
|
|
|
|
|
21
|
1
|
|
|
|
|
4
|
$args->{label_class} = q(radio_group); |
22
|
1
|
50
|
|
|
|
4
|
$args->{columns } = $self->columns if ($self->columns); |
23
|
1
|
50
|
|
|
|
11
|
$args->{labels } = $self->labels if ($self->labels); |
24
|
1
|
50
|
|
|
|
14
|
$args->{onchange } = $self->onchange if ($self->onchange); |
25
|
1
|
|
|
|
|
7
|
$args->{values } = $self->values; |
26
|
|
|
|
|
|
|
|
27
|
1
|
|
|
|
|
7
|
my $html = $hacc->radio_group( $args ); |
28
|
|
|
|
|
|
|
|
29
|
1
|
|
|
|
|
215
|
return $hacc->div( { class => q(checkbox_container) }, $html ); |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
|