line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::FormHandler::Widget::Field::Submit; |
2
|
|
|
|
|
|
|
# ABSTRACT: submit field rendering widget |
3
|
|
|
|
|
|
|
$HTML::FormHandler::Widget::Field::Submit::VERSION = '0.40068'; |
4
|
20
|
|
|
20
|
|
16912
|
use Moose::Role; |
|
20
|
|
|
|
|
61
|
|
|
20
|
|
|
|
|
210
|
|
5
|
20
|
|
|
20
|
|
111487
|
use namespace::autoclean; |
|
20
|
|
|
|
|
59
|
|
|
20
|
|
|
|
|
209
|
|
6
|
20
|
|
|
20
|
|
1651
|
use HTML::FormHandler::Render::Util ('process_attrs'); |
|
20
|
|
|
|
|
51
|
|
|
20
|
|
|
|
|
195
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub render_element { |
10
|
19
|
|
|
19
|
0
|
66
|
my ( $self, $result ) = @_; |
11
|
19
|
|
33
|
|
|
71
|
$result ||= $self->result; |
12
|
|
|
|
|
|
|
|
13
|
19
|
|
|
|
|
59
|
my $output = '<input type="submit" name="'; |
14
|
19
|
|
|
|
|
617
|
$output .= $self->html_name . '"'; |
15
|
19
|
|
|
|
|
566
|
$output .= ' id="' . $self->id . '"'; |
16
|
19
|
|
|
|
|
612
|
$output .= ' value="' . $self->html_filter($self->_localize($self->value)) . '"'; |
17
|
19
|
|
|
|
|
150
|
$output .= process_attrs($self->element_attributes($result)); |
18
|
19
|
|
|
|
|
75
|
$output .= ' />'; |
19
|
19
|
|
|
|
|
70
|
return $output; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
sub render { |
23
|
18
|
|
|
18
|
0
|
67
|
my ( $self, $result ) = @_; |
24
|
18
|
|
66
|
|
|
211
|
$result ||= $self->result; |
25
|
18
|
50
|
|
|
|
67
|
die "No result for form field '" . $self->full_name . "'. Field may be inactive." unless $result; |
26
|
18
|
|
|
|
|
117
|
my $output = $self->render_element( $result ); |
27
|
18
|
|
|
|
|
114
|
return $self->wrap_field( $result, $output ); |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=pod |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=encoding UTF-8 |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 NAME |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
HTML::FormHandler::Widget::Field::Submit - submit field rendering widget |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=head1 VERSION |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
version 0.40068 |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 SYNOPSIS |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Renders a submit field. |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=head1 AUTHOR |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
FormHandler Contributors - see HTML::FormHandler |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
This software is copyright (c) 2017 by Gerda Shank. |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
59
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=cut |