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              
2             use strict;
3 2     2   84142  
  2         10  
  2         56  
4             use base 'Rose::HTML::Form::Field::Submit';
5 2     2   8  
  2         4  
  2         843  
6             __PACKAGE__->required_html_attr_value(type => 'reset');
7              
8             1;
9              
10              
11             =head1 NAME
12              
13             Rose::HTML::Form::Field::Reset - Object representation of a reset button in an HTML form.
14              
15             =head1 SYNOPSIS
16              
17             $field =
18             Rose::HTML::Form::Field::Reset->new(name => 'reset',
19             value => 'Reset');
20              
21             print $field->html;
22              
23             # or...
24              
25             print $field->image_html(src => 'images/reset_button.gif');
26              
27             ...
28              
29             =head1 DESCRIPTION
30              
31             L<Rose::HTML::Form::Field::Reset> is an object representation of a reset button in an HTML form.
32              
33             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.
34              
35             =head1 HTML ATTRIBUTES
36              
37             Valid attributes:
38              
39             accept
40             accesskey
41             alt
42             checked
43             class
44             dir
45             disabled
46             id
47             ismap
48             lang
49             maxlength
50             name
51             onblur
52             onchange
53             onclick
54             ondblclick
55             onfocus
56             onkeydown
57             onkeypress
58             onkeyup
59             onmousedown
60             onmousemove
61             onmouseout
62             onmouseover
63             onmouseup
64             onselect
65             readonly
66             size
67             src
68             style
69             tabindex
70             title
71             type
72             usemap
73             value
74             xml:lang
75              
76             Required attributes (default values in parentheses):
77              
78             name
79             type (reset)
80              
81             Boolean attributes:
82              
83             checked
84             disabled
85             ismap
86             readonly
87              
88             =head1 CONSTRUCTOR
89              
90             =over 4
91              
92             =item B<new PARAMS>
93              
94             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.
95              
96             =back
97              
98             =head1 OBJECT METHODS
99              
100             =over 4
101              
102             =item B<image_html [ARGS]>
103              
104             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.)
105              
106             The "src" HTML attribute must be set (either in ARGS or from an existing value for that attribute) or a fatal error will occur.
107              
108             =item B<image_xhtml [ARGS]>
109              
110             Like L<image_html()|/image_html>, but serialized to XHTML instead.
111              
112             =item B<value [VALUE]>
113              
114             Gets or sets the value of the "value" HTML attribute.
115              
116             =back
117              
118             =head1 AUTHOR
119              
120             John C. Siracusa (siracusa@gmail.com)
121              
122             =head1 LICENSE
123              
124             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.