[Bps-public-commit] r19127 - in RT-FormTools: .

sartak at bestpractical.com sartak at bestpractical.com
Fri Apr 10 12:16:48 EDT 2009


Author: sartak
Date: Fri Apr 10 12:16:48 2009
New Revision: 19127

Modified:
   RT-FormTools/   (props changed)
   RT-FormTools/html/FormTools/Form

Log:
 r81929 at onn:  sartak | 2009-04-10 12:16:19 -0400
 Instead of hardcoding caller, allow the user to pass in the real URL for validation so that Form works inside a wrapper


Modified: RT-FormTools/html/FormTools/Form
==============================================================================
--- RT-FormTools/html/FormTools/Form	(original)
+++ RT-FormTools/html/FormTools/Form	Fri Apr 10 12:16:48 2009
@@ -1,5 +1,6 @@
 <%args>
 $next
+$next_for_validation => undef
 $include_header => 1
 $validation => 0
 </%args>
@@ -68,6 +69,8 @@
    delete $request_args{$key} if ($core_fields{$key});
 }
 
+$next_for_validation ||= $m->caller(1)->path;
+
 </%init>
 % if ($include_header) {
 <& /Elements/Header, Title => $m->notes('page_title') &>
@@ -76,7 +79,7 @@
 
 <& /Elements/ListActions, actions => \@results &>
 
-<form method="POST" action="<% $validation ? $m->caller(1)->path : $next %>" enctype="multipart/form-data">
+<form method="POST" action="<% $validation ? $next_for_validation : $next %>" enctype="multipart/form-data">
 % if ($validation) {
 <input type="hidden" name="_form_tools_next" value="<%$next%>" />
 % }



More information about the Bps-public-commit mailing list