Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Use the button name for the value when it is the only thing specified

  • Loading branch information...
commit 0ba95c4b2cbbde4c6c89061e3a55c598811f814f 1 parent 0d42acd
@perlpilot authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  lib/Dancer/Plugin/TTHelpers.pm
View
3  lib/Dancer/Plugin/TTHelpers.pm
@@ -117,7 +117,7 @@ Example:
Example:
-=item C<button([OBJ], NAME, VALUE, [ ATTR ])>
+=item C<button([OBJ], NAME, [VALUE], [ ATTR ])>
Example:
@@ -238,6 +238,7 @@ hook 'before_template' => sub {
my $obj = shift if blessed $_[0];
my $attributes = &process_attributes;
my ($name, $value) = @_;
+ $value //= $name;
return qq(<input type="button" name="$name" value="$value" $attributes />);
};
Please sign in to comment.
Something went wrong with that request. Please try again.