diff options
author | ivan <ivan> | 2009-12-28 19:20:25 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-12-28 19:20:25 +0000 |
commit | 03ceab71dad1e5eb366865d304e5e459cc905ce4 (patch) | |
tree | 18b4532289a0237ae694b1ad5c033b25f448bd7c /httemplate/edit/process/elements/process.html | |
parent | 5950a980cef4968ac59ca8041d2204e6d98e7a3d (diff) |
beginning of prospect/CRM/contact work
Diffstat (limited to 'httemplate/edit/process/elements/process.html')
-rw-r--r-- | httemplate/edit/process/elements/process.html | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/httemplate/edit/process/elements/process.html b/httemplate/edit/process/elements/process.html index 5befdd337..e24f3f681 100644 --- a/httemplate/edit/process/elements/process.html +++ b/httemplate/edit/process/elements/process.html @@ -56,13 +56,17 @@ Example: }, + 'process_o2m' => { 'table' => table_name', + 'num_col' => 'column', #if column name is different in + #link_table than source_table + }, #checks CGI params and whatever else before much else runs #return an error string or empty for no error 'precheck_callback' => sub { my( $cgi ) = @_; }, #supplies arguments to insert() and replace() - # for use with tables that are FS::option_Common + # for use with tables that are FS::option_Common (among other things) 'args_callback' => sub { my( $cgi, $object ) = @_; }, 'debug' => 1, #turns on debugging output @@ -255,6 +259,28 @@ if ( !$error && $opt{'process_m2name'} ) { } +if ( !$error && $opt{'process_o2m'} ) { + + my @process_o2m = ref($opt{'process_o2m'}) eq 'ARRAY' + ? @{ $opt{'process_o2m'} } + : ( $opt{'process_o2m'} ); + + + foreach my $process_o2m (@process_o2m) { + + if ( $opt{'debug'} ) { + warn "$me processing o2m:\n". Dumper( %{ $process_o2m }, + 'params' => scalar($cgi->Vars), + ); + } + + $error = $new->process_o2m( %{ $process_o2m }, + 'params' => scalar($cgi->Vars), + ); + } + +} + if ( $error ) { $cgi->param('error', $error); |