Author: spadkins
Date: Fri Sep 11 07:29:47 2009
New Revision: 13308
Modified:
p5ee/trunk/App-Widget/lib/App/Widget.pm
Log:
added the action="$url" to the mainform <form> tag (includes PATH_INFO but not
QUERY_STRING)
Modified: p5ee/trunk/App-Widget/lib/App/Widget.pm
==============================================================================
--- p5ee/trunk/App-Widget/lib/App/Widget.pm (original)
+++ p5ee/trunk/App-Widget/lib/App/Widget.pm Fri Sep 11 07:29:47 2009
@@ -214,6 +214,14 @@
$context->get_messages(); # apparently, this also clears messages
delete $self->{messages};
+ my ($request);
+ my $form_options = "";
+ if ($context->can("request")) {
+ my $request = $context->request();
+ my $url = $request->url();
+ $form_options .= " action=\"$url\"";
+ }
+
my $content = <<EOF;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
@@ -221,7 +229,7 @@
<title>${title}</title>
$context_head</head>
<body${bodyoptions}>
-<form method="POST" id="mainform">
+<form method="POST" id="mainform"${form_options}>
$session_html
$event_placeholder
$onload_support