projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
merge NG auth, RT#21563
[freeside.git]
/
httemplate
/
edit
/
process
/
elements
/
process.html
diff --git
a/httemplate/edit/process/elements/process.html
b/httemplate/edit/process/elements/process.html
index
12b3bd9
..
0439d4e
100644
(file)
--- 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 ) = @_; },
#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 ) = @_; },
#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);
my @values = ( 1 );
if ( $bfield ) {
@values = $cgi->param($bfield);
- warn join(',', @values);
+
#
warn join(',', @values);
}
my $new;
}
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
if ( $opt{'agent_virt'} ) {
if ( ! $new->agentnum
@@
-250,8
+257,6
@@
foreach my $value ( @values ) {
}
}
- $error ||= $new->check;
-
my @args = ();
if ( !$error && $opt{'args_callback'} ) {
@args = &{ $opt{'args_callback'} }( $cgi, $new );
my @args = ();
if ( !$error && $opt{'args_callback'} ) {
@args = &{ $opt{'args_callback'} }( $cgi, $new );
@@
-265,6
+270,9
@@
foreach my $value ( @values ) {
if ( !$error ) {
if ( $old_pkey ) {
if ( !$error ) {
if ( $old_pkey ) {
+
+ &{ $opt{'edit_callback'} }( $new, $old ) if $opt{'edit_callback'};
+
$error = $new->replace($old, @args);
} else {
$error = $new->insert(@args);
$error = $new->replace($old, @args);
} else {
$error = $new->insert(@args);