line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::FormFu::Element::Radiogroup; |
2
|
|
|
|
|
|
|
|
3
|
18
|
|
|
18
|
|
1736
|
use strict; |
|
18
|
|
|
|
|
18
|
|
|
18
|
|
|
|
|
714
|
|
4
|
|
|
|
|
|
|
our $VERSION = '2.05'; # VERSION |
5
|
|
|
|
|
|
|
|
6
|
18
|
|
|
18
|
|
66
|
use Moose; |
|
18
|
|
|
|
|
19
|
|
|
18
|
|
|
|
|
105
|
|
7
|
|
|
|
|
|
|
extends 'HTML::FormFu::Element::Checkboxgroup'; |
8
|
|
|
|
|
|
|
|
9
|
18
|
|
|
18
|
|
83253
|
use HTML::FormFu::Constants qw( $EMPTY_STR ); |
|
18
|
|
|
|
|
25
|
|
|
18
|
|
|
|
|
1777
|
|
10
|
18
|
|
|
18
|
|
76
|
use HTML::FormFu::Util qw( append_xml_attribute process_attrs ); |
|
18
|
|
|
|
|
23
|
|
|
18
|
|
|
|
|
1797
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
after BUILD => sub { |
13
|
|
|
|
|
|
|
my $self = shift; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
$self->input_type('radio'); |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
return; |
18
|
|
|
|
|
|
|
}; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
1; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
__END__ |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 NAME |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
HTML::FormFu::Element::Radiogroup - Group of radiobutton form fields |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 VERSION |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
version 2.05 |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 SYNOPSIS |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
YAML config: |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
--- |
39
|
|
|
|
|
|
|
elements: |
40
|
|
|
|
|
|
|
- type: Radiogroup |
41
|
|
|
|
|
|
|
name: sex |
42
|
|
|
|
|
|
|
options: |
43
|
|
|
|
|
|
|
- [ 'm', 'Male' ] |
44
|
|
|
|
|
|
|
- [ 'f', 'Female' ] |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 DESCRIPTION |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Convenient to use group of radio button fields. |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Use the same syntax as you would to create a Select element optgroup to |
51
|
|
|
|
|
|
|
create RadioGroup sub-groups, see L<HTML::FormFu::Role::Element::Group/options> |
52
|
|
|
|
|
|
|
for details. |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 METHODS |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head2 options |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
See L<HTML::FormFu::Role::Element::Group/options>. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head2 values |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
See L<HTML::FormFu::Role::Element::Group/values>. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head2 value_range |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
See L<HTML::FormFu::Role::Element::Group/value_range>. |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head2 empty_first |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
See L<HTML::FormFu::Role::Element::Group/empty_first>. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head2 auto_id |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
In addition to the substitutions documented by L<HTML::FormFu/auto_id>, |
75
|
|
|
|
|
|
|
C<%c> will be replaced by an incremented integer, to ensure there are |
76
|
|
|
|
|
|
|
no duplicated ID's. |
77
|
|
|
|
|
|
|
|
78
|
|
|
|
|
|
|
--- |
79
|
|
|
|
|
|
|
elements: |
80
|
|
|
|
|
|
|
type: Radiogroup |
81
|
|
|
|
|
|
|
name: foo |
82
|
|
|
|
|
|
|
auto_id: "%n_%c" |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head2 reverse_group |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
See L<HTML::FormFu::Element::Checkboxgroup/reverse_group>. |
87
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=head1 DEPRECATED METHODS |
89
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
=head2 radiogroup_filename |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=head1 SEE ALSO |
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
Is a sub-class of, and inherits methods from |
95
|
|
|
|
|
|
|
L<HTML::FormFu::Element::Checkboxgroup>, |
96
|
|
|
|
|
|
|
L<HTML::FormFu::Role::Element::Group>, |
97
|
|
|
|
|
|
|
L<HTML::FormFu::Role::Element::Field>, |
98
|
|
|
|
|
|
|
L<HTML::FormFu::Element> |
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
L<HTML::FormFu> |
101
|
|
|
|
|
|
|
|
102
|
|
|
|
|
|
|
=head1 AUTHOR |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
Carl Franks, C<cfranks@cpan.org> |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=head1 LICENSE |
107
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
This library is free software, you can redistribute it and/or modify it under |
109
|
|
|
|
|
|
|
the same terms as Perl itself. |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=cut |