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.40068'; |
4
|
26
|
|
|
26
|
|
20026
|
use Moose; |
|
26
|
|
|
|
|
86
|
|
|
26
|
|
|
|
|
230
|
|
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
|
141
|
sub do_label {0} |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
sub _result_from_input { |
15
|
13
|
|
|
13
|
|
69
|
my ( $self, $result, $input, $exists ) = @_; |
16
|
13
|
|
|
|
|
382
|
$self->_set_result($result); |
17
|
13
|
|
|
|
|
389
|
$result->_set_input($input); |
18
|
13
|
|
|
|
|
386
|
$result->_set_field_def($self); |
19
|
13
|
|
|
|
|
40
|
return $result; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
23
|
26
|
|
|
26
|
|
176774
|
use namespace::autoclean; |
|
26
|
|
|
|
|
81
|
|
|
26
|
|
|
|
|
471
|
|
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.40068 |
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) 2017 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 |