Index: openacs-4/contrib/packages/simulation/www/siminst/map-characters.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/map-characters.tcl,v diff -u -r1.15 -r1.16 --- openacs-4/contrib/packages/simulation/www/siminst/map-characters.tcl 22 Jan 2004 14:08:39 -0000 1.15 +++ openacs-4/contrib/packages/simulation/www/siminst/map-characters.tcl 11 Mar 2004 12:13:40 -0000 1.16 @@ -46,6 +46,12 @@ ]] } +ad_form -extend -name characters -form { + {show_contacts_p:boolean(radio),optional + {label "Should we these contacts?"} + {options {{"Show contacts" t} {"Don't show contacts" f}}} + } +} wizard submit characters -buttons { back next } @@ -56,13 +62,22 @@ simulation::role::get -role_id $role_id -array sim_role_array set role_$role_id $sim_role_array(character_id) } + set show_contacts_p [db_string gettheflag { + select show_contacts_p + from sim_simulations + where simulation_id=:workflow_id}] } -on_submit { db_transaction { # Map each role to chosen character foreach role_id [workflow::get_roles -workflow_id $workflow_id] { set row(character_id) [set role_${role_id}] simulation::role::edit -role_id $role_id -array row } + db_dml show_contacts_p { + update sim_simulations + set show_contacts_p = :show_contacts_p + where simulation_id = :workflow_id + } } simulation::template::flush_inst_state -workflow_id $workflow_id