[Jifty-commit] r4053 - jifty/trunk/lib/Jifty/Web/Form

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Fri Sep 7 06:21:37 EDT 2007


Author: clkao
Date: Fri Sep  7 06:21:33 2007
New Revision: 4053

Modified:
   jifty/trunk/lib/Jifty/Web/Form/Clickable.pm

Log:
Do not do clever & broken input_name for buttons when preserve_state is false.

Modified: jifty/trunk/lib/Jifty/Web/Form/Clickable.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/Form/Clickable.pm	(original)
+++ jifty/trunk/lib/Jifty/Web/Form/Clickable.pm	Fri Sep  7 06:21:33 2007
@@ -493,13 +493,16 @@
           continuation => $self->_continuation,
           @_ }
     );
-    my %parameters = $self->post_parameters;
+    my %parameters = $self->preserve_state ? $self->post_parameters : ();
 
     $field->input_name(
         join "|",
         map      { $_ . "=" . $parameters{$_} }
             grep { defined $parameters{$_} } keys %parameters
     );
+
+    $field->input_name( Jifty->web->serial ) unless $field->input_name;
+
     $field->name( join '|', keys %{ $args->{parameters} } );
     $field->button_as_link($self->render_as_link);
 


More information about the Jifty-commit mailing list