[Jifty-commit] r2452 - in jifty/branches/template-declare: .
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Tue Jan 2 01:08:15 EST 2007
Author: jesse
Date: Tue Jan 2 01:08:07 2007
New Revision: 2452
Modified:
jifty/branches/template-declare/ (props changed)
jifty/branches/template-declare/lib/Jifty/Web/Form.pm
Log:
r46668 at pinglin: jesse | 2007-01-02 01:07:26 -0500
* better defaulting for form action
Modified: jifty/branches/template-declare/lib/Jifty/Web/Form.pm
==============================================================================
--- jifty/branches/template-declare/lib/Jifty/Web/Form.pm (original)
+++ jifty/branches/template-declare/lib/Jifty/Web/Form.pm Tue Jan 2 01:08:07 2007
@@ -73,7 +73,7 @@
my %args = (name => undef,
call => undef,
target => undef,
- submit_to => $ENV{PATH_INFO},
+ submit_to => undef,
disable_autocomplete => undef,
@_);
@@ -82,6 +82,7 @@
$self->name($args{name});
$self->call($args{call});
$self->target($args{target});
+ $self->submit_to($args{'submit_to'});
$self->disable_autocomplete($args{disable_autocomplete});
}
@@ -189,7 +190,7 @@
}
}
- my $form_start = qq!<form method="post" action="! . Jifty->web->escape( $self->submit_to) . qq!"!;
+ my $form_start = qq!<form method="post" action="! . Jifty->web->escape( $self->submit_to || $ENV{PATH_INFO}) . qq!"!;
$form_start .= qq! name="@{[ $self->name ]}"! if defined $self->name;
$form_start .= qq! target="@{[ $self->target ]}"! if defined $self->target;
$form_start .= qq! autocomplete="off"! if defined $self->disable_autocomplete;
More information about the Jifty-commit
mailing list