[freeside-commits] freeside/httemplate/edit/process/elements process.html, 1.2, 1.3

Ivan,,, ivan at wavetail.420.am
Sun May 14 09:47:32 PDT 2006


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

Modified Files:
	process.html 
Log Message:
first part of ACL and re-skinning work and some other small stuff

Index: process.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/elements/process.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- process.html	22 Apr 2006 00:58:39 -0000	1.2
+++ process.html	14 May 2006 16:47:30 -0000	1.3
@@ -2,10 +2,21 @@
 
   # options example...
   # 
+  ###
+  ##req
+  ##
   # 'table' => 
+  #
   # #? 'primary_key' => #required when the dbdef doesn't know...???
   # #? 'fields' => []
+  #
+  ###
+  ##opt
+  ###
   # 'viewall_dir' => '', #'search' or 'browse', defaults to 'search'
+  # 'process_m2m' => { 'link_table'   => 'link_table_name',
+  #                    'target_table' => 'target_table_name',
+  #                  }.
 
   my(%opt) = @_;
 
@@ -31,12 +42,16 @@
   if ( $pkeyvalue ) {
     $error = $new->replace($old);
   } else {
-    warn $new;
     $error = $new->insert;
-    warn $error;
     $pkeyvalue = $new->getfield($pkey);
   }
 
+  if ( !$error && $opt{'process_m2m'} ) {
+    $error = $new->process_m2m( %{ $opt{'process_m2m'} },
+                                'params' => scalar($cgi->Vars),
+                              );
+  }
+
   if ( $error ) {
     $cgi->param('error', $error);
     print $cgi->redirect(popurl(2). "$table.html?". $cgi->query_string );



More information about the freeside-commits mailing list