Index: openacs-4/packages/simulation/www/siminst/simulation-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/simulation-edit.tcl,v diff -u -N -r1.15.2.1 -r1.15.2.2 --- openacs-4/packages/simulation/www/siminst/simulation-edit.tcl 22 Mar 2004 15:49:03 -0000 1.15.2.1 +++ openacs-4/packages/simulation/www/siminst/simulation-edit.tcl 29 Mar 2004 14:58:57 -0000 1.15.2.2 @@ -8,6 +8,8 @@ simulation::template::get -workflow_id $workflow_id -array sim_template +set stylesheet_options [simulation::object::get_object_type_options -object_type sim_stylesheet] + ad_form -export { workflow_id } -name simulation -form { {pretty_name:text {label "Simulation Name"} @@ -43,16 +45,22 @@ {label "Should we show states?
(i.e. Started, Open, Written...)"} {options {{"Show states" t} {"Don't show states" f}}} } + {stylesheet:integer(select),optional + {label "CSS Stylesheet"} + {options $stylesheet_options} + } } -on_request { foreach elm { - send_start_note_date + send_start_note_date case_start case_end pretty_name enroll_type enroll_start enroll_end + show_states_p + stylesheet } { set $elm $sim_template($elm) } @@ -93,11 +101,6 @@ set enroll_end [clock format [expr [clock seconds] + 2*$one_week + $default_duration] -format "%Y-%m-%d"] } - set show_states_p [db_string gettheflag_states { - select show_states_p - from sim_simulations - where simulation_id=:workflow_id}] - } -on_submit { # Date validation @@ -163,20 +166,15 @@ break } - foreach elm { send_start_note_date case_start case_end pretty_name description description_mime_type enroll_type enroll_start enroll_end } { + foreach elm { send_start_note_date case_start case_end pretty_name description description_mime_type enroll_type enroll_start enroll_end + show_states_p stylesheet } { set row($elm) [set $elm] } simulation::template::edit \ -workflow_id $workflow_id \ -array row - db_dml show_states_p { - update sim_simulations - set show_states_p = :show_states_p - where simulation_id = :workflow_id - } - simulation::template::flush_inst_state -workflow_id $workflow_id wizard forward }