Debian Codegraph @

Debconf/Element/Web/Password.pm

raw
1 #!/usr/bin/perl
2
3 =head1 NAME
4
5 Debconf::Element::Web::Password - A password input field on a form
6
7 =cut
8
9 package Debconf::Element::Web::Password;
10 use warnings;
11 use strict;
12 use base qw(Debconf::Element);
13
14 =head1 DESCRIPTION
15
16 This element handles a password input field on a web form.
17
18 =head1 METHODS
19
20 =over 4
21
22 =item show
23
24 Generates and returns html representing the password box.
25
26 =cut
27
28 sub show {
29 my $this=shift;
30
31 $_=$this->question->extended_description;
32 s/\n/\n<br>\n/g;
33 $_.="\n<p>\n";
34
35 my $default='';
36 $default=$this->question->value if defined $this->question->value;
37 my $id=$this->id;
38 $_.="<b>".$this->question->description."</b><input type=password name=\"$id\" value=\"$default\">\n";
39
40 return $_;
41 }
42
43 =back
44
45 =head1 AUTHOR
46
47 Joey Hess <[email protected]>
48
49 =cut
50
51 1