File Coverage

blib/lib/Rose/HTML/Form/Field/Reset.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1             package Rose::HTML::Form::Field::Reset;
2              
3 2     2   112519 use strict;
  2         12  
  2         67  
4              
5 2     2   21 use base 'Rose::HTML::Form::Field::Submit';
  2         9  
  2         1106  
6              
7             __PACKAGE__->required_html_attr_value(type => 'reset');
8              
9             1;
10              
11             __END__
12              
13             =head1 NAME
14              
15             Rose::HTML::Form::Field::Reset - Object representation of a reset button in an HTML form.
16              
17             =head1 SYNOPSIS
18              
19             $field =
20             Rose::HTML::Form::Field::Reset->new(name => 'reset',
21             value => 'Reset');
22              
23             print $field->html;
24              
25             # or...
26              
27             print $field->image_html(src => 'images/reset_button.gif');
28              
29             ...
30              
31             =head1 DESCRIPTION
32              
33             L<Rose::HTML::Form::Field::Reset> is an object representation of a reset button in an HTML form.
34              
35             This class inherits from, and follows the conventions of, L<Rose::HTML::Form::Field>. Inherited methods that are not overridden will not be documented a second time here. See the L<Rose::HTML::Form::Field> documentation for more information.
36              
37             =head1 HTML ATTRIBUTES
38              
39             Valid attributes:
40              
41             accept
42             accesskey
43             alt
44             checked
45             class
46             dir
47             disabled
48             id
49             ismap
50             lang
51             maxlength
52             name
53             onblur
54             onchange
55             onclick
56             ondblclick
57             onfocus
58             onkeydown
59             onkeypress
60             onkeyup
61             onmousedown
62             onmousemove
63             onmouseout
64             onmouseover
65             onmouseup
66             onselect
67             readonly
68             size
69             src
70             style
71             tabindex
72             title
73             type
74             usemap
75             value
76             xml:lang
77              
78             Required attributes (default values in parentheses):
79              
80             name
81             type (reset)
82              
83             Boolean attributes:
84              
85             checked
86             disabled
87             ismap
88             readonly
89              
90             =head1 CONSTRUCTOR
91              
92             =over 4
93              
94             =item B<new PARAMS>
95              
96             Constructs a new L<Rose::HTML::Form::Field::Reset> object based on PARAMS, where PARAMS are name/value pairs. Any object method is a valid parameter name.
97              
98             =back
99              
100             =head1 OBJECT METHODS
101              
102             =over 4
103              
104             =item B<image_html [ARGS]>
105              
106             Returns the HTML serialization of the reset button using an image instead of a standard button widget (in other words, type="image"). ARGS is a list of HTML attribute name/value pairs which are temporarily set, then backed out before the method returns. (The type="image" change is also backed out.)
107              
108             The "src" HTML attribute must be set (either in ARGS or from an existing value for that attribute) or a fatal error will occur.
109              
110             =item B<image_xhtml [ARGS]>
111              
112             Like L<image_html()|/image_html>, but serialized to XHTML instead.
113              
114             =item B<value [VALUE]>
115              
116             Gets or sets the value of the "value" HTML attribute.
117              
118             =back
119              
120             =head1 AUTHOR
121              
122             John C. Siracusa (siracusa@gmail.com)
123              
124             =head1 LICENSE
125              
126             Copyright (c) 2010 by John C. Siracusa. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.