line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::FormFu::Element::Block; |
2
|
|
|
|
|
|
|
|
3
|
157
|
|
|
157
|
|
70662
|
use strict; |
|
157
|
|
|
|
|
217
|
|
|
157
|
|
|
|
|
6144
|
|
4
|
|
|
|
|
|
|
our $VERSION = '2.05'; # VERSION |
5
|
|
|
|
|
|
|
|
6
|
157
|
|
|
157
|
|
582
|
use Moose; |
|
157
|
|
|
|
|
186
|
|
|
157
|
|
|
|
|
728
|
|
7
|
157
|
|
|
157
|
|
628031
|
use MooseX::Attribute::FormFuChained; |
|
157
|
|
|
|
|
239
|
|
|
157
|
|
|
|
|
6985
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
extends 'HTML::FormFu::Element'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
with 'HTML::FormFu::Role::CreateChildren', |
12
|
|
|
|
|
|
|
'HTML::FormFu::Role::GetProcessors', |
13
|
|
|
|
|
|
|
'HTML::FormFu::Role::ContainsElements', |
14
|
|
|
|
|
|
|
'HTML::FormFu::Role::ContainsElementsSharedWithField', |
15
|
|
|
|
|
|
|
'HTML::FormFu::Role::FormAndBlockMethods', |
16
|
|
|
|
|
|
|
'HTML::FormFu::Role::FormBlockAndFieldMethods'; |
17
|
|
|
|
|
|
|
|
18
|
157
|
|
|
157
|
|
647
|
use HTML::FormFu::Constants qw( $EMPTY_STR ); |
|
157
|
|
|
|
|
195
|
|
|
157
|
|
|
|
|
15258
|
|
19
|
157
|
|
|
157
|
|
726
|
use HTML::FormFu::Util qw( _get_elements xml_escape process_attrs ); |
|
157
|
|
|
|
|
187
|
|
|
157
|
|
|
|
|
6814
|
|
20
|
157
|
|
|
157
|
|
593
|
use Clone (); |
|
157
|
|
|
|
|
193
|
|
|
157
|
|
|
|
|
3450
|
|
21
|
157
|
|
|
157
|
|
509
|
use List::Util 1.45 qw( uniq ); |
|
157
|
|
|
|
|
4482
|
|
|
157
|
|
|
|
|
7971
|
|
22
|
157
|
|
|
157
|
|
674
|
use Carp qw( croak ); |
|
157
|
|
|
|
|
214
|
|
|
157
|
|
|
|
|
173073
|
|
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
has tag => ( is => 'rw', traits => ['FormFuChained'] ); |
25
|
|
|
|
|
|
|
has nested_name => ( is => 'rw', traits => ['FormFuChained'] ); |
26
|
|
|
|
|
|
|
has original_nested_name => ( is => 'rw', traits => ['FormFuChained'] ); |
27
|
|
|
|
|
|
|
has auto_block_id => ( is => 'rw', traits => ['FormFuChained'] ); |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
has _elements => ( |
30
|
|
|
|
|
|
|
is => 'rw', |
31
|
|
|
|
|
|
|
default => sub { [] }, |
32
|
|
|
|
|
|
|
lazy => 1, |
33
|
|
|
|
|
|
|
isa => 'ArrayRef', |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
__PACKAGE__->mk_output_accessors(qw( content )); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
*elements = \&element; |
39
|
|
|
|
|
|
|
*constraints = \&constraint; |
40
|
|
|
|
|
|
|
*deflators = \&deflator; |
41
|
|
|
|
|
|
|
*filters = \&filter; |
42
|
|
|
|
|
|
|
*inflators = \&inflator; |
43
|
|
|
|
|
|
|
*validators = \&validator; |
44
|
|
|
|
|
|
|
*transformers = \&transformer; |
45
|
|
|
|
|
|
|
*plugins = \&plugin; |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
after BUILD => sub { |
48
|
|
|
|
|
|
|
my ( $self, $args ) = @_; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
$self->filename('block'); |
51
|
|
|
|
|
|
|
$self->tag('div'); |
52
|
|
|
|
|
|
|
$self->is_block(1); |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
return; |
55
|
|
|
|
|
|
|
}; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
sub _single_plugin { |
58
|
0
|
|
|
0
|
|
0
|
my ( $self, $arg ) = @_; |
59
|
|
|
|
|
|
|
|
60
|
0
|
0
|
|
|
|
0
|
if ( !ref $arg ) { |
|
|
0
|
|
|
|
|
|
61
|
0
|
|
|
|
|
0
|
$arg = { type => $arg }; |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
elsif ( ref $arg eq 'HASH' ) { |
64
|
0
|
|
|
|
|
0
|
$arg = {%$arg}; # shallow clone |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
else { |
67
|
0
|
|
|
|
|
0
|
croak 'invalid args'; |
68
|
|
|
|
|
|
|
} |
69
|
|
|
|
|
|
|
|
70
|
0
|
0
|
|
|
|
0
|
my @names = map { ref $_ ? @$_ : $_ } |
71
|
0
|
|
|
|
|
0
|
grep {defined} ( delete $arg->{name}, delete $arg->{names} ); |
|
0
|
|
|
|
|
0
|
|
72
|
|
|
|
|
|
|
|
73
|
0
|
0
|
|
|
|
0
|
if ( !@names ) { |
74
|
|
|
|
|
|
|
@names = uniq |
75
|
0
|
|
|
|
|
0
|
grep {defined} |
76
|
0
|
|
|
|
|
0
|
map { $_->nested_name } @{ $self->get_fields }; |
|
0
|
|
|
|
|
0
|
|
|
0
|
|
|
|
|
0
|
|
77
|
|
|
|
|
|
|
} |
78
|
|
|
|
|
|
|
|
79
|
0
|
0
|
|
|
|
0
|
croak "no field names to add plugin to" if !@names; |
80
|
|
|
|
|
|
|
|
81
|
0
|
|
|
|
|
0
|
my $type = delete $arg->{type}; |
82
|
|
|
|
|
|
|
|
83
|
0
|
|
|
|
|
0
|
my @return; |
84
|
|
|
|
|
|
|
|
85
|
0
|
|
|
|
|
0
|
for my $x (@names) { |
86
|
0
|
|
|
|
|
0
|
for my $field ( @{ $self->get_fields( { nested_name => $x } ) } ) { |
|
0
|
|
|
|
|
0
|
|
87
|
0
|
|
|
|
|
0
|
my $new = $field->_require_plugin( $type, $arg ); |
88
|
0
|
|
|
|
|
0
|
push @{ $field->_plugins }, $new; |
|
0
|
|
|
|
|
0
|
|
89
|
0
|
|
|
|
|
0
|
push @return, $new; |
90
|
|
|
|
|
|
|
} |
91
|
|
|
|
|
|
|
} |
92
|
|
|
|
|
|
|
|
93
|
0
|
|
|
|
|
0
|
return @return; |
94
|
|
|
|
|
|
|
} |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
sub pre_process { |
97
|
293
|
|
|
293
|
0
|
1325
|
my ($self) = @_; |
98
|
|
|
|
|
|
|
|
99
|
293
|
|
|
|
|
336
|
map { $_->pre_process } @{ $self->_elements }; |
|
591
|
|
|
|
|
2278
|
|
|
293
|
|
|
|
|
6989
|
|
100
|
|
|
|
|
|
|
|
101
|
293
|
|
|
|
|
1014
|
return; |
102
|
|
|
|
|
|
|
} |
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
sub process { |
105
|
337
|
|
|
337
|
0
|
1544
|
my ($self) = @_; |
106
|
|
|
|
|
|
|
|
107
|
337
|
|
|
|
|
368
|
map { $_->process } @{ $self->_elements }; |
|
785
|
|
|
|
|
3016
|
|
|
337
|
|
|
|
|
8059
|
|
108
|
|
|
|
|
|
|
|
109
|
337
|
|
|
|
|
1291
|
return; |
110
|
|
|
|
|
|
|
} |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
sub post_process { |
113
|
337
|
|
|
337
|
0
|
1369
|
my ($self) = @_; |
114
|
|
|
|
|
|
|
|
115
|
337
|
|
|
|
|
337
|
map { $_->post_process } @{ $self->_elements }; |
|
785
|
|
|
|
|
4822
|
|
|
337
|
|
|
|
|
8067
|
|
116
|
|
|
|
|
|
|
|
117
|
337
|
|
|
|
|
1478
|
return; |
118
|
|
|
|
|
|
|
} |
119
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
sub render_data { |
121
|
122
|
|
|
122
|
0
|
155
|
my $self = shift; |
122
|
|
|
|
|
|
|
|
123
|
122
|
50
|
|
|
|
457
|
my $render = $self->render_data_non_recursive( { @_ ? %{ $_[0] } : () } ); |
|
0
|
|
|
|
|
0
|
|
124
|
|
|
|
|
|
|
|
125
|
122
|
|
|
|
|
155
|
$render->{elements} = [ map { $_->render_data } @{ $self->_elements } ]; |
|
205
|
|
|
|
|
616
|
|
|
122
|
|
|
|
|
3020
|
|
126
|
|
|
|
|
|
|
|
127
|
122
|
|
|
|
|
376
|
return $render; |
128
|
|
|
|
|
|
|
} |
129
|
|
|
|
|
|
|
|
130
|
|
|
|
|
|
|
sub render_data_non_recursive { |
131
|
394
|
|
|
394
|
0
|
484
|
my ( $self, $args ) = @_; |
132
|
|
|
|
|
|
|
|
133
|
394
|
100
|
|
|
|
10247
|
my $render = $self->SUPER::render_data_non_recursive( { |
134
|
|
|
|
|
|
|
tag => $self->tag, |
135
|
|
|
|
|
|
|
content => xml_escape( $self->content ), |
136
|
|
|
|
|
|
|
$args ? %$args : (), |
137
|
|
|
|
|
|
|
} ); |
138
|
|
|
|
|
|
|
|
139
|
394
|
|
|
|
|
1215
|
return $render; |
140
|
|
|
|
|
|
|
} |
141
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
sub prepare_id { |
143
|
307
|
|
|
307
|
1
|
362
|
my ( $self, $render ) = @_; |
144
|
|
|
|
|
|
|
|
145
|
307
|
100
|
100
|
|
|
9009
|
if ( !defined $render->{attributes}{id} |
|
|
|
66
|
|
|
|
|
146
|
|
|
|
|
|
|
&& defined $self->auto_block_id |
147
|
|
|
|
|
|
|
&& length $self->auto_block_id ) |
148
|
|
|
|
|
|
|
{ |
149
|
3
|
100
|
|
|
|
13
|
my $form_name |
150
|
|
|
|
|
|
|
= defined $self->form->id |
151
|
|
|
|
|
|
|
? $self->form->id |
152
|
|
|
|
|
|
|
: $EMPTY_STR; |
153
|
|
|
|
|
|
|
|
154
|
3
|
|
|
|
|
13
|
my %string = ( f => $form_name, ); |
155
|
|
|
|
|
|
|
|
156
|
3
|
|
|
|
|
71
|
my $id = $self->auto_block_id; |
157
|
3
|
|
|
|
|
10
|
$id =~ s/%([f])/$string{$1}/g; |
158
|
|
|
|
|
|
|
|
159
|
3
|
100
|
|
|
|
8
|
if ( defined( my $count = $self->repeatable_count ) ) { |
160
|
2
|
|
|
|
|
6
|
$id =~ s/%r/$count/g; |
161
|
|
|
|
|
|
|
} |
162
|
|
|
|
|
|
|
|
163
|
3
|
|
|
|
|
11
|
$render->{attributes}{id} = $id; |
164
|
|
|
|
|
|
|
} |
165
|
|
|
|
|
|
|
|
166
|
307
|
|
|
|
|
474
|
return; |
167
|
|
|
|
|
|
|
} |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
sub string { |
170
|
189
|
|
|
189
|
0
|
239
|
my ( $self, $args ) = @_; |
171
|
|
|
|
|
|
|
|
172
|
189
|
|
50
|
|
|
687
|
$args ||= {}; |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
my $render |
175
|
|
|
|
|
|
|
= exists $args->{render_data} |
176
|
|
|
|
|
|
|
? $args->{render_data} |
177
|
189
|
50
|
|
|
|
779
|
: $self->render_data_non_recursive; |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
# start_block template |
180
|
|
|
|
|
|
|
|
181
|
189
|
|
|
|
|
243
|
my $html = ''; |
182
|
|
|
|
|
|
|
|
183
|
189
|
100
|
|
|
|
444
|
if ( defined $render->{tag} ) { |
184
|
|
|
|
|
|
|
$html .= sprintf "<%s%s>", |
185
|
|
|
|
|
|
|
$render->{tag}, |
186
|
186
|
|
|
|
|
589
|
process_attrs( $render->{attributes} ), |
187
|
|
|
|
|
|
|
; |
188
|
|
|
|
|
|
|
} |
189
|
|
|
|
|
|
|
|
190
|
189
|
100
|
|
|
|
473
|
if ( defined $render->{legend} ) { |
191
|
|
|
|
|
|
|
$html .= |
192
|
|
|
|
|
|
|
sprintf "\n<legend%s>%s</legend>", |
193
|
|
|
|
|
|
|
defined( $render->{legend_attributes} ) |
194
|
|
|
|
|
|
|
? process_attrs( $render->{legend_attributes} ) |
195
|
|
|
|
|
|
|
: '', |
196
|
18
|
50
|
|
|
|
71
|
$render->{legend}; |
197
|
|
|
|
|
|
|
} |
198
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
# block template |
200
|
|
|
|
|
|
|
|
201
|
189
|
|
|
|
|
263
|
$html .= "\n"; |
202
|
|
|
|
|
|
|
|
203
|
189
|
100
|
|
|
|
374
|
if ( defined $render->{content} ) { |
204
|
19
|
|
|
|
|
48
|
$html .= sprintf "%s\n", $render->{content}; |
205
|
|
|
|
|
|
|
} |
206
|
|
|
|
|
|
|
else { |
207
|
170
|
|
|
|
|
184
|
for my $elem ( @{ $self->get_elements } ) { |
|
170
|
|
|
|
|
619
|
|
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
# call render, so that child elements can use a different renderer |
210
|
302
|
|
|
|
|
1206
|
my $elem_html = $elem->render; |
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
# skip Blank fields |
213
|
302
|
50
|
|
|
|
645
|
if ( length $elem_html ) { |
214
|
302
|
|
|
|
|
1089
|
$html .= $elem_html . "\n"; |
215
|
|
|
|
|
|
|
} |
216
|
|
|
|
|
|
|
} |
217
|
|
|
|
|
|
|
} |
218
|
|
|
|
|
|
|
|
219
|
|
|
|
|
|
|
# end_block template |
220
|
|
|
|
|
|
|
|
221
|
189
|
100
|
|
|
|
495
|
if ( defined $render->{tag} ) { |
222
|
186
|
|
|
|
|
488
|
$html .= sprintf "</%s>", $render->{tag}; |
223
|
|
|
|
|
|
|
} |
224
|
|
|
|
|
|
|
|
225
|
189
|
|
|
|
|
1218
|
return $html; |
226
|
|
|
|
|
|
|
} |
227
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
sub start { |
229
|
2
|
|
|
2
|
1
|
1400
|
my ($self) = @_; |
230
|
|
|
|
|
|
|
|
231
|
2
|
|
|
|
|
10
|
return $self->tt( { |
232
|
|
|
|
|
|
|
filename => 'start_block', |
233
|
|
|
|
|
|
|
render_data => $self->render_data_non_recursive, |
234
|
|
|
|
|
|
|
} ); |
235
|
|
|
|
|
|
|
} |
236
|
|
|
|
|
|
|
|
237
|
|
|
|
|
|
|
sub end { |
238
|
2
|
|
|
2
|
1
|
50
|
my ($self) = @_; |
239
|
|
|
|
|
|
|
|
240
|
2
|
|
|
|
|
8
|
return $self->tt( { |
241
|
|
|
|
|
|
|
filename => 'end_block', |
242
|
|
|
|
|
|
|
render_data => $self->render_data_non_recursive, |
243
|
|
|
|
|
|
|
} ); |
244
|
|
|
|
|
|
|
} |
245
|
|
|
|
|
|
|
|
246
|
|
|
|
|
|
|
sub clone { |
247
|
26
|
|
|
26
|
1
|
35
|
my $self = shift; |
248
|
|
|
|
|
|
|
|
249
|
26
|
|
|
|
|
116
|
my $clone = $self->SUPER::clone(@_); |
250
|
|
|
|
|
|
|
|
251
|
26
|
|
|
|
|
42
|
$clone->_elements( [ map { $_->clone } @{ $self->_elements } ] ); |
|
31
|
|
|
|
|
104
|
|
|
26
|
|
|
|
|
741
|
|
252
|
|
|
|
|
|
|
|
253
|
26
|
|
|
|
|
37
|
map { $_->parent($clone) } @{ $clone->_elements }; |
|
31
|
|
|
|
|
84
|
|
|
26
|
|
|
|
|
575
|
|
254
|
|
|
|
|
|
|
|
255
|
26
|
|
|
|
|
101
|
$clone->default_args( Clone::clone( $self->default_args ) ); |
256
|
|
|
|
|
|
|
|
257
|
26
|
|
|
|
|
95
|
return $clone; |
258
|
|
|
|
|
|
|
} |
259
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
261
|
|
|
|
|
|
|
|
262
|
|
|
|
|
|
|
1; |
263
|
|
|
|
|
|
|
|
264
|
|
|
|
|
|
|
__END__ |
265
|
|
|
|
|
|
|
|
266
|
|
|
|
|
|
|
=head1 NAME |
267
|
|
|
|
|
|
|
|
268
|
|
|
|
|
|
|
HTML::FormFu::Element::Block - Block element |
269
|
|
|
|
|
|
|
|
270
|
|
|
|
|
|
|
=head1 VERSION |
271
|
|
|
|
|
|
|
|
272
|
|
|
|
|
|
|
version 2.05 |
273
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
=head1 SYNOPSIS |
275
|
|
|
|
|
|
|
|
276
|
|
|
|
|
|
|
--- |
277
|
|
|
|
|
|
|
elements: |
278
|
|
|
|
|
|
|
- type: Block |
279
|
|
|
|
|
|
|
elements: |
280
|
|
|
|
|
|
|
- type: Text |
281
|
|
|
|
|
|
|
name: foo |
282
|
|
|
|
|
|
|
|
283
|
|
|
|
|
|
|
- type: Block |
284
|
|
|
|
|
|
|
tag: span |
285
|
|
|
|
|
|
|
content: Whatever |
286
|
|
|
|
|
|
|
|
287
|
|
|
|
|
|
|
=head1 DESCRIPTION |
288
|
|
|
|
|
|
|
|
289
|
|
|
|
|
|
|
Block element which may contain other elements. |
290
|
|
|
|
|
|
|
|
291
|
|
|
|
|
|
|
=head1 METHODS |
292
|
|
|
|
|
|
|
|
293
|
|
|
|
|
|
|
=head2 tag |
294
|
|
|
|
|
|
|
|
295
|
|
|
|
|
|
|
Specifies which tag name should be used to render the block. |
296
|
|
|
|
|
|
|
|
297
|
|
|
|
|
|
|
Default Value: 'div' |
298
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
=head2 content |
300
|
|
|
|
|
|
|
|
301
|
|
|
|
|
|
|
If L</content> is set, it is used as the block's contents, and any attached |
302
|
|
|
|
|
|
|
elements are ignored. |
303
|
|
|
|
|
|
|
|
304
|
|
|
|
|
|
|
=head2 content_xml |
305
|
|
|
|
|
|
|
|
306
|
|
|
|
|
|
|
Arguments: $string |
307
|
|
|
|
|
|
|
|
308
|
|
|
|
|
|
|
If you don't want the content to be XML-escaped, use the L</content_xml> |
309
|
|
|
|
|
|
|
method instead of L</content>. |
310
|
|
|
|
|
|
|
|
311
|
|
|
|
|
|
|
=head2 content_loc |
312
|
|
|
|
|
|
|
|
313
|
|
|
|
|
|
|
Arguments: $localization_key |
314
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
To set the content to a localized string, set L</content_loc> to a key in |
316
|
|
|
|
|
|
|
your L10N file instead of using L</content>. |
317
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
=head2 elements |
319
|
|
|
|
|
|
|
|
320
|
|
|
|
|
|
|
See L<HTML::FormFu/elements> for details. |
321
|
|
|
|
|
|
|
|
322
|
|
|
|
|
|
|
=head2 element |
323
|
|
|
|
|
|
|
|
324
|
|
|
|
|
|
|
See L<HTML::FormFu/element> for details. |
325
|
|
|
|
|
|
|
|
326
|
|
|
|
|
|
|
=head2 deflators |
327
|
|
|
|
|
|
|
|
328
|
|
|
|
|
|
|
See L<HTML::FormFu/deflators> for details. |
329
|
|
|
|
|
|
|
|
330
|
|
|
|
|
|
|
=head2 deflator |
331
|
|
|
|
|
|
|
|
332
|
|
|
|
|
|
|
See L<HTML::FormFu/deflator> for details. |
333
|
|
|
|
|
|
|
|
334
|
|
|
|
|
|
|
=head2 filters |
335
|
|
|
|
|
|
|
|
336
|
|
|
|
|
|
|
See L<HTML::FormFu/filters> for details. |
337
|
|
|
|
|
|
|
|
338
|
|
|
|
|
|
|
=head2 filter |
339
|
|
|
|
|
|
|
|
340
|
|
|
|
|
|
|
See L<HTML::FormFu/filter> for details. |
341
|
|
|
|
|
|
|
|
342
|
|
|
|
|
|
|
=head2 constraints |
343
|
|
|
|
|
|
|
|
344
|
|
|
|
|
|
|
See L<HTML::FormFu/constraints> for details. |
345
|
|
|
|
|
|
|
|
346
|
|
|
|
|
|
|
=head2 constraint |
347
|
|
|
|
|
|
|
|
348
|
|
|
|
|
|
|
See L<HTML::FormFu/constraint> for details. |
349
|
|
|
|
|
|
|
|
350
|
|
|
|
|
|
|
=head2 inflators |
351
|
|
|
|
|
|
|
|
352
|
|
|
|
|
|
|
See L<HTML::FormFu/inflators> for details. |
353
|
|
|
|
|
|
|
|
354
|
|
|
|
|
|
|
=head2 inflator |
355
|
|
|
|
|
|
|
|
356
|
|
|
|
|
|
|
See L<HTML::FormFu/inflator> for details. |
357
|
|
|
|
|
|
|
|
358
|
|
|
|
|
|
|
=head2 validators |
359
|
|
|
|
|
|
|
|
360
|
|
|
|
|
|
|
See L<HTML::FormFu/validators> for details. |
361
|
|
|
|
|
|
|
|
362
|
|
|
|
|
|
|
=head2 validator |
363
|
|
|
|
|
|
|
|
364
|
|
|
|
|
|
|
See L<HTML::FormFu/validator> for details. |
365
|
|
|
|
|
|
|
|
366
|
|
|
|
|
|
|
=head2 transformers |
367
|
|
|
|
|
|
|
|
368
|
|
|
|
|
|
|
See L<HTML::FormFu/transformers> for details. |
369
|
|
|
|
|
|
|
|
370
|
|
|
|
|
|
|
=head2 transformer |
371
|
|
|
|
|
|
|
|
372
|
|
|
|
|
|
|
See L<HTML::FormFu/transformer> for details. |
373
|
|
|
|
|
|
|
|
374
|
|
|
|
|
|
|
=head2 auto_datalist_id |
375
|
|
|
|
|
|
|
|
376
|
|
|
|
|
|
|
See L<HTML::FormFu/auto_datalist_id> for details. |
377
|
|
|
|
|
|
|
|
378
|
|
|
|
|
|
|
=head1 CSS CLASSES |
379
|
|
|
|
|
|
|
|
380
|
|
|
|
|
|
|
=head2 auto_id |
381
|
|
|
|
|
|
|
|
382
|
|
|
|
|
|
|
See L<HTML::FormFu/auto_id> for details. |
383
|
|
|
|
|
|
|
|
384
|
|
|
|
|
|
|
=head2 auto_block_id |
385
|
|
|
|
|
|
|
|
386
|
|
|
|
|
|
|
Arguments: [$string] |
387
|
|
|
|
|
|
|
|
388
|
|
|
|
|
|
|
If set, the Block will be given an auto-generated |
389
|
|
|
|
|
|
|
L<id|HTML::FormFu::Element/id> attribute, if it doesn't have one already. |
390
|
|
|
|
|
|
|
|
391
|
|
|
|
|
|
|
The following character substitution will be performed: C<%f> will be |
392
|
|
|
|
|
|
|
replaced by L<< $form->id|/id >>, C<%r> will be replaced by |
393
|
|
|
|
|
|
|
L<< $block->repeatable_count|HTML::FormFu::Element::Repeatable/repeatable_count >>. |
394
|
|
|
|
|
|
|
|
395
|
|
|
|
|
|
|
Default Value: not defined |
396
|
|
|
|
|
|
|
|
397
|
|
|
|
|
|
|
Unlike most other auto_* methods, this is not an 'inherited accessor'. |
398
|
|
|
|
|
|
|
|
399
|
|
|
|
|
|
|
=head2 auto_label |
400
|
|
|
|
|
|
|
|
401
|
|
|
|
|
|
|
See L<HTML::FormFu/auto_label> for details. |
402
|
|
|
|
|
|
|
|
403
|
|
|
|
|
|
|
=head2 auto_error_class |
404
|
|
|
|
|
|
|
|
405
|
|
|
|
|
|
|
See L<HTML::FormFu/auto_error_class> for details. |
406
|
|
|
|
|
|
|
|
407
|
|
|
|
|
|
|
=head2 auto_error_message |
408
|
|
|
|
|
|
|
|
409
|
|
|
|
|
|
|
See L<HTML::FormFu/auto_error_message> for details. |
410
|
|
|
|
|
|
|
|
411
|
|
|
|
|
|
|
=head2 auto_constraint_class |
412
|
|
|
|
|
|
|
|
413
|
|
|
|
|
|
|
See L<HTML::FormFu/auto_constraint_class> for details. |
414
|
|
|
|
|
|
|
|
415
|
|
|
|
|
|
|
=head2 auto_inflator_class |
416
|
|
|
|
|
|
|
|
417
|
|
|
|
|
|
|
See L<HTML::FormFu/auto_inflator_class> for details. |
418
|
|
|
|
|
|
|
|
419
|
|
|
|
|
|
|
=head2 auto_validator_class |
420
|
|
|
|
|
|
|
|
421
|
|
|
|
|
|
|
See L<HTML::FormFu/auto_validator_class> for details. |
422
|
|
|
|
|
|
|
|
423
|
|
|
|
|
|
|
=head2 auto_transformer_class |
424
|
|
|
|
|
|
|
|
425
|
|
|
|
|
|
|
See L<HTML::FormFu/auto_transformer_class> for details. |
426
|
|
|
|
|
|
|
|
427
|
|
|
|
|
|
|
=head2 default_args |
428
|
|
|
|
|
|
|
|
429
|
|
|
|
|
|
|
See L<HTML::FormFu/default_args> for details. |
430
|
|
|
|
|
|
|
|
431
|
|
|
|
|
|
|
=head1 RENDERING |
432
|
|
|
|
|
|
|
|
433
|
|
|
|
|
|
|
=head2 start |
434
|
|
|
|
|
|
|
|
435
|
|
|
|
|
|
|
=head2 end |
436
|
|
|
|
|
|
|
|
437
|
|
|
|
|
|
|
=head1 INTROSPECTION |
438
|
|
|
|
|
|
|
|
439
|
|
|
|
|
|
|
=head2 get_elements |
440
|
|
|
|
|
|
|
|
441
|
|
|
|
|
|
|
See L<HTML::FormFu/get_elements> for details. |
442
|
|
|
|
|
|
|
|
443
|
|
|
|
|
|
|
=head2 get_element |
444
|
|
|
|
|
|
|
|
445
|
|
|
|
|
|
|
See L<HTML::FormFu/get_element> for details. |
446
|
|
|
|
|
|
|
|
447
|
|
|
|
|
|
|
=head2 get_all_elements |
448
|
|
|
|
|
|
|
|
449
|
|
|
|
|
|
|
See L<HTML::FormFu/get_all_elements> for details. |
450
|
|
|
|
|
|
|
|
451
|
|
|
|
|
|
|
=head2 get_fields |
452
|
|
|
|
|
|
|
|
453
|
|
|
|
|
|
|
See L<HTML::FormFu/get_fields> for details. |
454
|
|
|
|
|
|
|
|
455
|
|
|
|
|
|
|
=head2 get_field |
456
|
|
|
|
|
|
|
|
457
|
|
|
|
|
|
|
See L<HTML::FormFu/get_field> for details. |
458
|
|
|
|
|
|
|
|
459
|
|
|
|
|
|
|
=head2 get_deflators |
460
|
|
|
|
|
|
|
|
461
|
|
|
|
|
|
|
See L<HTML::FormFu/get_deflators> for details. |
462
|
|
|
|
|
|
|
|
463
|
|
|
|
|
|
|
=head2 get_deflator |
464
|
|
|
|
|
|
|
|
465
|
|
|
|
|
|
|
See L<HTML::FormFu/get_deflator> for details. |
466
|
|
|
|
|
|
|
|
467
|
|
|
|
|
|
|
=head2 get_filters |
468
|
|
|
|
|
|
|
|
469
|
|
|
|
|
|
|
See L<HTML::FormFu/get_filters> for details. |
470
|
|
|
|
|
|
|
|
471
|
|
|
|
|
|
|
=head2 get_filter |
472
|
|
|
|
|
|
|
|
473
|
|
|
|
|
|
|
See L<HTML::FormFu/get_filter> for details. |
474
|
|
|
|
|
|
|
|
475
|
|
|
|
|
|
|
=head2 get_constraints |
476
|
|
|
|
|
|
|
|
477
|
|
|
|
|
|
|
See L<HTML::FormFu/get_constraints> for details. |
478
|
|
|
|
|
|
|
|
479
|
|
|
|
|
|
|
=head2 get_constraint |
480
|
|
|
|
|
|
|
|
481
|
|
|
|
|
|
|
See L<HTML::FormFu/get_constraint> for details. |
482
|
|
|
|
|
|
|
|
483
|
|
|
|
|
|
|
=head2 get_inflators |
484
|
|
|
|
|
|
|
|
485
|
|
|
|
|
|
|
See L<HTML::FormFu/get_inflators> for details. |
486
|
|
|
|
|
|
|
|
487
|
|
|
|
|
|
|
=head2 get_inflator |
488
|
|
|
|
|
|
|
|
489
|
|
|
|
|
|
|
See L<HTML::FormFu/get_inflator> for details. |
490
|
|
|
|
|
|
|
|
491
|
|
|
|
|
|
|
=head2 get_validators |
492
|
|
|
|
|
|
|
|
493
|
|
|
|
|
|
|
See L<HTML::FormFu/get_validators> for details. |
494
|
|
|
|
|
|
|
|
495
|
|
|
|
|
|
|
=head2 get_validator |
496
|
|
|
|
|
|
|
|
497
|
|
|
|
|
|
|
See L<HTML::FormFu/get_validator> for details. |
498
|
|
|
|
|
|
|
|
499
|
|
|
|
|
|
|
=head2 get_transformers |
500
|
|
|
|
|
|
|
|
501
|
|
|
|
|
|
|
See L<HTML::FormFu/get_transformers> for details. |
502
|
|
|
|
|
|
|
|
503
|
|
|
|
|
|
|
=head2 get_transformer |
504
|
|
|
|
|
|
|
|
505
|
|
|
|
|
|
|
See L<HTML::FormFu/get_transformer> for details. |
506
|
|
|
|
|
|
|
|
507
|
|
|
|
|
|
|
=head2 get_errors |
508
|
|
|
|
|
|
|
|
509
|
|
|
|
|
|
|
See L<HTML::FormFu/get_errors> for details. |
510
|
|
|
|
|
|
|
|
511
|
|
|
|
|
|
|
=head2 clear_errors |
512
|
|
|
|
|
|
|
|
513
|
|
|
|
|
|
|
See L<HTML::FormFu/clear_errors> for details. |
514
|
|
|
|
|
|
|
|
515
|
|
|
|
|
|
|
=head1 SEE ALSO |
516
|
|
|
|
|
|
|
|
517
|
|
|
|
|
|
|
Base-class for L<HTML::FormFu::Element::Fieldset>. |
518
|
|
|
|
|
|
|
|
519
|
|
|
|
|
|
|
Is a sub-class of, and inherits methods from L<HTML::FormFu::Element> |
520
|
|
|
|
|
|
|
|
521
|
|
|
|
|
|
|
L<HTML::FormFu> |
522
|
|
|
|
|
|
|
|
523
|
|
|
|
|
|
|
=head1 REMOVED METHODS |
524
|
|
|
|
|
|
|
|
525
|
|
|
|
|
|
|
=head2 element_defaults |
526
|
|
|
|
|
|
|
|
527
|
|
|
|
|
|
|
Has been removed; use L</default_args> instead. |
528
|
|
|
|
|
|
|
|
529
|
|
|
|
|
|
|
=head1 AUTHOR |
530
|
|
|
|
|
|
|
|
531
|
|
|
|
|
|
|
Carl Franks, C<cfranks@cpan.org> |
532
|
|
|
|
|
|
|
|
533
|
|
|
|
|
|
|
=head1 LICENSE |
534
|
|
|
|
|
|
|
|
535
|
|
|
|
|
|
|
This library is free software, you can redistribute it and/or modify it under |
536
|
|
|
|
|
|
|
the same terms as Perl itself. |
537
|
|
|
|
|
|
|
|
538
|
|
|
|
|
|
|
=cut |