Index: openacs.org-dev/packages/forums/www/message-post.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs.org-dev/packages/forums/www/message-post.tcl,v diff -u -r1.7 -r1.8 --- openacs.org-dev/packages/forums/www/message-post.tcl 20 Aug 2002 19:20:53 -0000 1.7 +++ openacs.org-dev/packages/forums/www/message-post.tcl 4 Sep 2002 03:23:44 -0000 1.8 @@ -42,6 +42,24 @@ set table_border_color [parameter::get -parameter table_border_color] set table_bgcolor [parameter::get -parameter table_bgcolor] +# switchover to using ad_form +# this allows simpler state management of the form --DaveB +# +# message_id:key +# this generates a message_id from acs_objects_sequence useful for +# double-click protection and inserting a new message in the database +# +# -validate section runs the message content through ad_html_security_check +# to check for tags that can cause trouble +# +# -confirm_template sends to message-post-confirm +# with magic hidden variables to maintain ad_form state when we get back here +# The confirm template reproduces all the data in hidden variables +# so that they can be returned for processing +# +# -new_data section runs after confirm_template to actually insert the +# message into the database + ad_form -name message -confirm_template message-post-confirm -form { message_id:key @@ -158,4 +176,5 @@ } else { lappend context_bar {Post a Message} } + ad_return_template