Index: openacs-4/packages/acs-subsite/www/permissions/grant.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/www/permissions/grant.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/acs-subsite/www/permissions/grant.tcl 12 Mar 2004 13:45:27 -0000 1.12 +++ openacs-4/packages/acs-subsite/www/permissions/grant.tcl 13 Jan 2005 13:55:50 -0000 1.13 @@ -9,6 +9,7 @@ object_id:integer,notnull privileges:multiple,optional {application_url ""} + {return_url ""} } ad_require_permission $object_id admin @@ -107,12 +108,12 @@ lappend select_list [list "[string repeat "   " $level] $privilege" $privilege] } -form create grant +ad_form -name grant -export {return_url} -form { + {object_id:text(hidden) + {value $object_id} + } +} -element create grant object_id \ - -widget hidden \ - -value $object_id - element create grant application_url \ -widget hidden \ -value $application_url \ @@ -160,6 +161,11 @@ } } - ad_returnredirect "one?[export_vars [list object_id application_url]]" + if {[exists_and_not_null return_url]} { + ad_returnredirect "$return_url" + } else { + ad_returnredirect "one?[export_vars [list object_id application_url]]" + } + ad_script_abort }