Index: openacs-4/contrib/packages/simulation/www/simplay/task-detail.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simplay/Attic/task-detail.tcl,v diff -u -N -r1.22.2.4 -r1.22.2.5 --- openacs-4/contrib/packages/simulation/www/simplay/task-detail.tcl 19 Mar 2004 10:52:44 -0000 1.22.2.4 +++ openacs-4/contrib/packages/simulation/www/simplay/task-detail.tcl 19 Apr 2004 16:05:09 -0000 1.22.2.5 @@ -35,7 +35,7 @@ set common_enabled_action_ids [list [list $enabled_action_id $case_id]] if { [empty_string_p $return_url] } { - set return_url [export_vars -base tasks { case_id role_id }] + set return_url [export_vars -base case { case_id role_id }] } if { [info exists body] && [info exists received_message_item_id] } { @@ -88,8 +88,10 @@ ) and sm.case_id = :case_id }] } { - set subject "Re: $subject" - set body " + # Only refresh form with prepopulated subject and body if this is not a submit + if { ![string equal action [ns_set iget [rp_getform] form:id]] } { + set subject "Re: $subject" + set body " -----Original Message----- From: [workflow::role::get_element -role_id $from_role_id -element pretty_name] @@ -99,7 +101,8 @@ [ad_html_text_convert -from $mime_type -to "text/plain" $triggering_body]" - ad_returnredirect [export_vars -base [ad_conn url] { enabled_action_id role_id subject body bulk_p received_message_item_id}] + ad_returnredirect [export_vars -base [ad_conn url] { enabled_action_id role_id subject body bulk_p received_message_item_id}] + } } } @@ -260,7 +263,7 @@ ad_returnredirect $return_url ad_script_abort - } + } set focus "action.subject" } else { Index: openacs-4/packages/simulation/www/simplay/task-detail.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simplay/task-detail.tcl,v diff -u -N -r1.22.2.4 -r1.22.2.5 --- openacs-4/packages/simulation/www/simplay/task-detail.tcl 19 Mar 2004 10:52:44 -0000 1.22.2.4 +++ openacs-4/packages/simulation/www/simplay/task-detail.tcl 19 Apr 2004 16:05:09 -0000 1.22.2.5 @@ -35,7 +35,7 @@ set common_enabled_action_ids [list [list $enabled_action_id $case_id]] if { [empty_string_p $return_url] } { - set return_url [export_vars -base tasks { case_id role_id }] + set return_url [export_vars -base case { case_id role_id }] } if { [info exists body] && [info exists received_message_item_id] } { @@ -88,8 +88,10 @@ ) and sm.case_id = :case_id }] } { - set subject "Re: $subject" - set body " + # Only refresh form with prepopulated subject and body if this is not a submit + if { ![string equal action [ns_set iget [rp_getform] form:id]] } { + set subject "Re: $subject" + set body " -----Original Message----- From: [workflow::role::get_element -role_id $from_role_id -element pretty_name] @@ -99,7 +101,8 @@ [ad_html_text_convert -from $mime_type -to "text/plain" $triggering_body]" - ad_returnredirect [export_vars -base [ad_conn url] { enabled_action_id role_id subject body bulk_p received_message_item_id}] + ad_returnredirect [export_vars -base [ad_conn url] { enabled_action_id role_id subject body bulk_p received_message_item_id}] + } } } @@ -260,7 +263,7 @@ ad_returnredirect $return_url ad_script_abort - } + } set focus "action.subject" } else {