diff options
author | ivan <ivan> | 2010-06-07 02:40:15 +0000 |
---|---|---|
committer | ivan <ivan> | 2010-06-07 02:40:15 +0000 |
commit | 0fe2d918669fe77298f95335958edf596a5f9149 (patch) | |
tree | 03024ee3d4058554a787822b7ccf4d6ddfd2005e /httemplate/edit/process/elements/process.html | |
parent | d5f11772496be17d55ed3f7f26d19d3576f9d2be (diff) |
domain rules based on templates (rules from other domains), RT#7514
Diffstat (limited to 'httemplate/edit/process/elements/process.html')
-rw-r--r-- | httemplate/edit/process/elements/process.html | 11 |
1 files changed, 11 insertions, 0 deletions
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 ); + } + } </%init> |