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.1 -r1.2 --- openacs-4/contrib/packages/simulation/www/simbuild/template-edit.tcl 13 Nov 2003 15:35:48 -0000 1.1 +++ openacs-4/contrib/packages/simulation/www/simbuild/template-edit.tcl 18 Nov 2003 12:19:39 -0000 1.2 @@ -31,15 +31,38 @@ {label "Template Name"} {html {size 40}} } + {ready_p:boolean(checkbox),optional + {label "Ready for use?"} + {options {""}} + } + {suggested_duration:string,optional + {label "Suggested Duration"} + } } -edit_request { workflow::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) } -new_data { set workflow_id [simulation::template::new \ -short_name $name \ -pretty_name $name \ + -ready_p $ready_p \ + -suggested_duration $suggested_duration \ -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] + + } -after_submit { ad_returnredirect template-edit?workflow_id=$workflow_id ad_script_abort