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.50 -r1.51 --- openacs-4/packages/contacts/www/contact-add.tcl 3 Aug 2006 07:24:08 -0000 1.50 +++ openacs-4/packages/contacts/www/contact-add.tcl 28 Oct 2006 16:47:33 -0000 1.51 @@ -294,6 +294,20 @@ callback contact::organization_new -package_id $package_id -contact_id $party_id -name $name } + # Now we have the organization or person created. Redirect as AMS can be saved in the background. + #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] +# } else { + if {[empty_string_p $object_id_two]} { + ad_returnredirect [contact::url -party_id $party_id] +# ad_returnredirect [export_vars -base "/contacts" -url {{query_id $group_id}}] + } else { + ad_returnredirect "${package_url}/$object_id_two" + } + # } + + # Save the contact information # No clue why this is not part of the db_transaction though .... callback contact::special_attributes::ad_form_save -party_id $party_id -form "party_ae" @@ -386,17 +400,6 @@ 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] -# } else { - if {[empty_string_p $object_id_two]} { - ad_returnredirect [contact::url -party_id $party_id] -# ad_returnredirect [export_vars -base "/contacts" -url {{query_id $group_id}}] - } else { - ad_returnredirect "${package_url}/$object_id_two" - } - # } ad_script_abort }