X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fprocess%2Felements%2Fprocess.html;h=ebbc2f7783e64b8c452b73fad2442db0c0e98e48;hb=31a9c95e5b7125ef666248699fff31f1f8211364;hp=87cadb774ae636f828d28bd99b64a4f4b15a0f7b;hpb=2e928dafa3cf6383ea9e97f48af61af05e5a292a;p=freeside.git diff --git a/httemplate/edit/process/elements/process.html b/httemplate/edit/process/elements/process.html index 87cadb774..ebbc2f778 100644 --- a/httemplate/edit/process/elements/process.html +++ b/httemplate/edit/process/elements/process.html @@ -65,6 +65,9 @@ Example: #return an error string or empty for no error 'precheck_callback' => sub { my( $cgi ) = @_; }, + #after everything's inserted + 'noerror_callback' => sub { my( $cgi, $object ) = @_; }, + #supplies arguments to insert() and replace() # for use with tables that are FS::option_Common (among other things) 'args_callback' => sub { my( $cgi, $object ) = @_; }, @@ -298,12 +301,20 @@ if ( !$error && $opt{'process_o2m'} ) { if ( $error ) { + $cgi->param('error', $error); if ( $opt{'clear_on_error'} && scalar(@{$opt{'clear_on_error'}}) ) { foreach my $field (@{$opt{'clear_on_error'}}) { $cgi->param($field, '') } } + +} else { + + if ( $opt{'noerror_callback'} ) { + &{ $opt{'noerror_callback'} }( $cgi, $new ); + } + }