[Jifty-commit] r863 - in jifty/trunk: lib/Jifty/Web/Form/Field

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Fri Apr 14 10:39:20 EDT 2006


Author: trs
Date: Fri Apr 14 10:39:17 2006
New Revision: 863

Added:
   jifty/trunk/lib/Jifty/Web/Form/Field/ResetButton.pm
Modified:
   jifty/trunk/   (props changed)

Log:
 r9822 at wintermute:  tom | 2006-04-14 10:37:47 -0400
 Add a type for reset buttons


Added: jifty/trunk/lib/Jifty/Web/Form/Field/ResetButton.pm
==============================================================================
--- (empty file)
+++ jifty/trunk/lib/Jifty/Web/Form/Field/ResetButton.pm	Fri Apr 14 10:39:17 2006
@@ -0,0 +1,33 @@
+use warnings;
+use strict;
+ 
+package Jifty::Web::Form::Field::ResetButton;
+
+use base qw/Jifty::Web::Form::Field::InlineButton/;
+
+
+=head2 render
+
+Renders the reset button widget
+
+=cut
+
+sub render_widget {
+    my $self  = shift;
+    my $field = join(
+        ' ',
+        '<input',
+        'type="reset"',
+        'name="' . $self->input_name . '" ',
+        'value="' . _($self->label ). '"',
+        $self->_widget_class('button', 'reset'),
+        $self->javascript,
+        ' />',
+        "\n"
+    );
+    Jifty->web->out($field);
+    return '';
+}
+
+
+1;


More information about the Jifty-commit mailing list