Index: openacs-4/contrib/packages/simulation/www/simbuild/template-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simbuild/Attic/template-edit.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/simulation/www/simbuild/template-edit.tcl 18 Nov 2003 12:19:39 -0000 1.2 +++ openacs-4/contrib/packages/simulation/www/simbuild/template-edit.tcl 18 Nov 2003 15:59:12 -0000 1.3 @@ -31,20 +31,18 @@ {label "Template Name"} {html {size 40}} } - {ready_p:boolean(checkbox),optional + {ready_p:boolean(radio),optional {label "Ready for use?"} - {options {""}} + {options {{Yes t} {No f}}} } - {suggested_duration:string,optional + {suggested_duration:text,optional {label "Suggested Duration"} } } -edit_request { - workflow::get -workflow_id $workflow_id -array sim_template_array + simulation::template::get -workflow_id $workflow_id -array sim_template_array set name $sim_template_array(pretty_name) - set ready_p 't' -#TODO: replace workflow api call with simulation::template::get, -# combining data from workflows with data from sim_simulation, -# hence providing $sim_template_array(ready_p) + set ready_p $sim_template_array(ready_p) + set suggested_duration $sim_template_array(suggested_duration) } -new_data { set workflow_id [simulation::template::new \ -short_name $name \ @@ -54,17 +52,17 @@ -package_key $package_key \ -object_id $package_id] } -edit_data { - set workflow_id [simulation::template::edit \ - -short_name $name \ - -pretty_name $name \ - -ready_p $ready_p \ - -suggested_duration $suggested_duration \ - -package_key $package_key \ - -object_id $package_id] + simulation::template::edit \ + -workflow_id $workflow_id \ + -short_name $name \ + -pretty_name $name \ + -ready_p $ready_p \ + -suggested_duration $suggested_duration \ + -package_key $package_key \ + -object_id $package_id - } -after_submit { - ad_returnredirect template-edit?workflow_id=$workflow_id + ad_returnredirect [export_vars -base "template-edit" { workflow_id }] ad_script_abort }