Index: openacs-4/packages/invoices/www/offer-accept.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/invoices/www/offer-accept.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/invoices/www/offer-accept.tcl 16 Aug 2005 20:04:34 -0000 1.1 +++ openacs-4/packages/invoices/www/offer-accept.tcl 6 Sep 2005 23:01:24 -0000 1.2 @@ -15,19 +15,23 @@ set context [list [list "offer-list" "[_ invoices.iv_offer_2]"] $page_title] set confirm_options [list [list "[_ invoices.continue_with_accept]" t] [list "[_ invoices.cancel_and_return]" f]] +set return_url [export_vars -base offer-accept-2 {offer_id}] ad_form -name accept_confirm -action offer-accept -form { {offer_id:key} {title:text(inform) {label "[_ invoices.iv_offer_accept]"}} - {confirmation:text(radio) {label " "} {options $confirm_options} {value f}} + {confirmation:text(radio) {label " "} {options $confirm_options} {value t}} } -select_query_name {title} \ -on_submit { if {$confirmation} { - iv::offer::accept -offer_id $offer_id + db_transaction { + iv::offer::accept -offer_id $offer_id + callback iv::offer_accept -offer_id $offer_id + } } } -after_submit { if {$confirmation} { - ad_returnredirect [export_vars -base offer-accept-2 {offer_id}] + ad_returnredirect $return_url ad_script_abort } else { ad_returnredirect [export_vars -base offer-ae {offer_id {mode display}}]