[freeside-commits] freeside/httemplate/edit/process/elements process.html, 1.4, 1.5 svc_Common.html, NONE, 1.1

Ivan,,, ivan at wavetail.420.am
Tue Jul 11 17:20:24 PDT 2006


Update of /home/cvs/cvsroot/freeside/httemplate/edit/process/elements
In directory wavetail:/tmp/cvs-serv17459/httemplate/edit/process/elements

Modified Files:
	process.html 
Added Files:
	svc_Common.html 
Log Message:
svc_phone service and CDR billing from imported CDRs

--- NEW FILE: svc_Common.html ---
<%

  my %opt = @_;
  my $table = $opt{'table'};
  $opt{'fields'} ||= [ fields($table) ];
  push @{ $opt{'fields'} }, qw( pkgnum svcpart );

%><%= include( 'process.html',
                 'edit_ext' => 'cgi',
                 'redirect' => popurl(3)."view/$table.cgi?",
                 %opt,
           )
%>


Index: process.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/elements/process.html,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- process.html	18 Jun 2006 12:54:49 -0000	1.4
+++ process.html	12 Jul 2006 00:20:22 -0000	1.5
@@ -5,6 +5,7 @@
   ###
   ##req
   ##
+  #
   # 'table' => 
   #
   # #? 'primary_key' => #required when the dbdef doesn't know...???
@@ -13,7 +14,14 @@
   ###
   ##opt
   ###
+  #
   # 'viewall_dir' => '', #'search' or 'browse', defaults to 'search'
+  # OR
+  # 'redirect'    => 'view/table.cgi?', # value of primary key is appended
+  #
+  # 'edit_ext' => 'html', #defaults to 'html', you might want 'cgi' while the
+  #                       #naming is still inconsistent
+  # 
   # 'process_m2m' => { 'link_table'   => 'link_table_name',
   #                    'target_table' => 'target_table_name',
   #                  },
@@ -65,9 +73,14 @@
                                  );
   }
 
+  # XXX print?!?!
+
   if ( $error ) {
     $cgi->param('error', $error);
-    print $cgi->redirect(popurl(2). "$table.html?". $cgi->query_string );
+    my $edit_ext = $opt{'edit_ext'} || 'html';
+    print $cgi->redirect(popurl(2). "$table.$edit_ext?". $cgi->query_string );
+  } elsif ( $opt{'redirect'} ) {
+    print $cgi->redirect( $opt{'redirect'}. $pkeyvalue );
   } else { 
     print $cgi->redirect( popurl(3).
                           ( $opt{'viewall_dir'} || 'search' ).



More information about the freeside-commits mailing list