Index: openacs-4/packages/simulation/www/simbuild/role-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simbuild/role-edit.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/simulation/www/simbuild/role-edit.tcl 9 Dec 2003 09:52:44 -0000 1.5 +++ openacs-4/packages/simulation/www/simbuild/role-edit.tcl 10 Dec 2003 16:06:46 -0000 1.6 @@ -38,20 +38,20 @@ # role form #--------------------------------------------------------------------- -ad_form -name role -cancel_url index -form { +ad_form -name role -form { {role_id:key} {workflow_id:integer(hidden),optional} - {name:text + {pretty_name:text {label "Role Name"} {html {size 20}} } } -edit_request { workflow::role::get -role_id $role_id -array role_array set workflow_id $role_array(workflow_id) permission::require_write_permission -object_id $workflow_id - set name $role_array(pretty_name) + set pretty_name $role_array(pretty_name) workflow::get -workflow_id $workflow_id -array sim_template_array - set page_title "Edit Role template $name" + set page_title "Edit Role template $pretty_name" set context [list [list "." "Sim Templates"] [list "template-edit?workflow_id=$workflow_id" "$sim_template_array(pretty_name)"] $page_title] } -new_request { @@ -64,8 +64,7 @@ permission::require_write_permission -object_id $workflow_id simulation::role::new \ -template_id $workflow_id \ - -role_short_name $name \ - -role_pretty_name $name + -pretty_name $pretty_name } -edit_data { workflow::role::get -role_id $role_id -array role_array @@ -74,12 +73,13 @@ # could be spoofed permission::require_write_permission -object_id $role_array(workflow_id) - set role_array(pretty_name) $name + set row(pretty_name) $pretty_name + set row(short_name) {} workflow::role::edit \ -role_id $role_id \ -workflow_id $workflow_id \ - -array role_array + -array row } -after_submit { ad_returnredirect [export_vars -base "template-edit" { workflow_id }]