[freeside-commits] freeside/httemplate/edit/process/elements process.html, 1.14, 1.15

Ivan,,, ivan at wavetail.420.am
Thu Jun 12 14:53:34 PDT 2008


Update of /home/cvs/cvsroot/freeside/httemplate/edit/process/elements
In directory wavetail.420.am:/tmp/cvs-serv5562/httemplate/edit/process/elements

Modified Files:
	process.html 
Log Message:
fix cloning w/new package editor

Index: process.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/elements/process.html,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- process.html	15 Apr 2008 13:42:40 -0000	1.14
+++ process.html	12 Jun 2008 21:53:31 -0000	1.15
@@ -20,6 +20,7 @@
    'viewall_dir'  => '', #'search' or 'browse', defaults to 'search'
    OR
    'redirect'     => 'view/table.cgi?', # value of primary key is appended
+                                        # (string or coderef returning a string)
    OR
    'popup_reload' => 'Momentary success message', #will reload parent window
 
@@ -111,21 +112,29 @@
   </BODY>
   </HTML>
 
-%} elsif ( $opt{'redirect'} ) {
+%} else {
+%  
+%  $opt{'redirect'} = &{$opt{'redirect'}}($cgi, $new)
+%    if ref($opt{'redirect'}) eq 'CODE';
+%
+%  if ( $opt{'redirect'} ) {
 %
 <% $cgi->redirect( $opt{'redirect'}. $pkeyvalue ) %>
 %
-%} else { 
-%  my $ext = $opt{'viewall_ext'} || 'html';
+%  } else { 
+%
+%    my $ext = $opt{'viewall_ext'} || 'html';
+%
 <% $cgi->redirect( popurl(3). ($opt{viewall_dir}||'search'). "/$table.$ext" ) %>
+%
+%  }
+%
 %}
-<%once>
-
-  my $me = 'process.html:';
-
-</%once>
+%
 <%init>
 
+my $me = 'process.html:';
+
 my(%opt) = @_;
 
 my $curuser = $FS::CurrentUser::CurrentUser;



More information about the freeside-commits mailing list