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