summaryrefslogtreecommitdiff
path: root/httemplate/edit/process/elements/process.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/edit/process/elements/process.html')
-rw-r--r--httemplate/edit/process/elements/process.html12
1 files changed, 11 insertions, 1 deletions
diff --git a/httemplate/edit/process/elements/process.html b/httemplate/edit/process/elements/process.html
index 2d39e9dce..0439d4e9c 100644
--- a/httemplate/edit/process/elements/process.html
+++ b/httemplate/edit/process/elements/process.html
@@ -70,6 +70,9 @@ Example:
#return an error string or empty for no error
'precheck_callback' => sub { my( $cgi ) = @_; },
+ #after the new object is created
+ 'post_new_object_callback' => sub { my( $cgi, $object ) = @_; },
+
#after everything's inserted
'noerror_callback' => sub { my( $cgi, $object ) = @_; },
@@ -201,7 +204,7 @@ my %hash =
my @values = ( 1 );
if ( $bfield ) {
@values = $cgi->param($bfield);
- warn join(',', @values);
+ #warn join(',', @values);
}
my $new;
@@ -226,6 +229,10 @@ foreach my $value ( @values ) {
}
}
+ if ( $opt{'post_new_object_callback'} ) {
+ &{ $opt{'post_new_object_callback'} }( $cgi, $new );
+ }
+
if ( $opt{'agent_virt'} ) {
if ( ! $new->agentnum
@@ -263,6 +270,9 @@ foreach my $value ( @values ) {
if ( !$error ) {
if ( $old_pkey ) {
+
+ &{ $opt{'edit_callback'} }( $new, $old ) if $opt{'edit_callback'};
+
$error = $new->replace($old, @args);
} else {
$error = $new->insert(@args);