Index: openacs-4/packages/simulation/www/simbuild/state-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simbuild/state-edit.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/simulation/www/simbuild/state-edit.tcl 26 Jan 2004 12:34:47 -0000 1.5 +++ openacs-4/packages/simulation/www/simbuild/state-edit.tcl 30 Nov 2004 21:09:16 -0000 1.6 @@ -34,6 +34,12 @@ workflow::get -workflow_id $workflow_id -array sim_template_array + +if { ![exists_and_not_null return_url] } { + set return_url [export_vars -base "template-edit" { workflow_id }] +} + + if { ![ad_form_new_p -key state_id] } { set page_title "Edit State $state_array(pretty_name)" } else { @@ -63,7 +69,8 @@ ad_form \ -name state \ - -edit_buttons [list [list [ad_decode [ad_form_new_p -key state_id] 1 [_ acs-kernel.common_add] [_ acs-kernel.common_edit]] ok]] \ + -cancel_url $return_url \ + -edit_buttons [list [list [ad_decode [ad_form_new_p -key state_id] 1 [_ acs-kernel.common_OK] [_ acs-kernel.common_OK]] ok]] \ -export { return_url } \ -form { {state_id:key} @@ -74,7 +81,7 @@ {parent_action_id:integer(select) {label "Parent task"} {mode display} - {options {[workflow::action::get_options -workflow_id $workflow_id]}} + {options {[workflow::action::get_options -all=1 -workflow_id $workflow_id]}} } } } else { @@ -133,9 +140,10 @@ -workflow_id $workflow_id \ -array row] - if { ![exists_and_not_null return_url] } { - set return_url [export_vars -base "template-edit" { workflow_id }] - } - ad_returnredirect $return_url + # Let's mark this template edited + set sim_type "dev_template" + + ad_returnredirect [export_vars -base "template-sim-type-update" { workflow_id sim_type return_url }] + ad_script_abort }