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