Index: openacs-4/packages/contacts/tcl/contacts-callback-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/tcl/contacts-callback-procs.tcl,v diff -u -r1.41 -r1.42 --- openacs-4/packages/contacts/tcl/contacts-callback-procs.tcl 17 May 2006 07:41:43 -0000 1.41 +++ openacs-4/packages/contacts/tcl/contacts-callback-procs.tcl 21 May 2006 00:43:42 -0000 1.42 @@ -58,6 +58,16 @@ } { } +ad_proc -public -callback contact::contact_form_after_submit { + {-package_id:required} + {-form:required} + {-object_type:required} + {-party_id:required} +} { + After the contact-edit and/or contact-add form have been completely submitted, + and data has been flushed you can do something for your site. +} - + ad_proc -public -callback contacts::multirow::extend { {-type} {-key} @@ -75,7 +85,6 @@ at the end of the merge process. } - - ad_proc -public -callback contacts::extensions { {-multirow} {-user_id} Index: openacs-4/packages/contacts/www/contact-add.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/contact-add.tcl,v diff -u -r1.47 -r1.48 --- openacs-4/packages/contacts/www/contact-add.tcl 28 Apr 2006 10:13:28 -0000 1.47 +++ openacs-4/packages/contacts/www/contact-add.tcl 21 May 2006 00:43:42 -0000 1.48 @@ -327,6 +327,9 @@ } -after_submit { contact::flush -party_id $party_id contact::search::flush_results_counts + + callback contact::contact_form_after_submit -party_id $party_id -package_id $package_id -object_type $object_type -form "party_ae" + #the formbutton does not work. No clue how to fix it. # if { [exists_and_not_null formbutton\:save_add_another] } { # ad_returnredirect [export_vars -base "/contacts/$object_type/add" -url] Index: openacs-4/packages/contacts/www/contact-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/contact-edit.tcl,v diff -u -r1.19 -r1.20 --- openacs-4/packages/contacts/www/contact-edit.tcl 16 Apr 2006 10:08:09 -0000 1.19 +++ openacs-4/packages/contacts/www/contact-edit.tcl 21 May 2006 00:43:42 -0000 1.20 @@ -185,6 +185,8 @@ contact::flush -party_id $party_id contact::search::flush_results_counts + callback contact::contact_form_after_submit -party_id $party_id -package_id $package_id -object_type $object_type -form "party_ae" + if { ![exists_and_not_null return_url] } { set return_url [contact::url -party_id $party_id] }