line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package HTML::FormHandler::Field::Submit; |
2
|
|
|
|
|
|
|
# ABSTRACT: submit field |
3
|
|
|
|
|
|
|
$HTML::FormHandler::Field::Submit::VERSION = '0.40067'; |
4
|
25
|
|
|
25
|
|
17333
|
use Moose; |
|
25
|
|
|
|
|
37
|
|
|
25
|
|
|
|
|
187
|
|
5
|
|
|
|
|
|
|
extends 'HTML::FormHandler::Field::NoValue'; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
has '+value' => ( default => 'Save' ); |
9
|
|
|
|
|
|
|
has '+widget' => ( default => 'Submit' ); |
10
|
|
|
|
|
|
|
has '+type_attr' => ( default => 'submit' ); |
11
|
|
|
|
|
|
|
has '+html5_type_attr' => ( default => 'submit' ); |
12
|
26
|
|
|
26
|
0
|
97
|
sub do_label {0} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub _result_from_input { |
15
|
12
|
|
|
12
|
|
55
|
my ( $self, $result, $input, $exists ) = @_; |
16
|
12
|
|
|
|
|
338
|
$self->_set_result($result); |
17
|
12
|
|
|
|
|
356
|
$result->_set_input($input); |
18
|
12
|
|
|
|
|
380
|
$result->_set_field_def($self); |
19
|
12
|
|
|
|
|
27
|
return $result; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
23
|
25
|
|
|
25
|
|
116697
|
use namespace::autoclean; |
|
25
|
|
|
|
|
44
|
|
|
25
|
|
|
|
|
239
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__END__ |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=pod |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=encoding UTF-8 |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 NAME |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
HTML::FormHandler::Field::Submit - submit field |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 VERSION |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
version 0.40067 |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 SYNOPSIS |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
Use this field to declare a submit field in your form. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
has_field 'submit' => ( type => 'Submit', value => 'Save' ); |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
It will be used by L<HTML::FormHandler::Render::Simple> to construct |
47
|
|
|
|
|
|
|
a form with C<< $form->render >>. |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Uses the 'submit' widget. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
If you have multiple submit buttons, currently the only way to test |
52
|
|
|
|
|
|
|
which one has been clicked is with C<< $field->input >>. The 'value' |
53
|
|
|
|
|
|
|
attribute is used for the HTML input field 'value'. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 AUTHOR |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
FormHandler Contributors - see HTML::FormHandler |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
This software is copyright (c) 2016 by Gerda Shank. |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
64
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=cut |