Index: openacs.org-dev/packages/forums/www/message-post-confirm.adp =================================================================== RCS file: /usr/local/cvsroot/openacs.org-dev/packages/forums/www/message-post-confirm.adp,v diff -u -r1.2 -r1.3 --- openacs.org-dev/packages/forums/www/message-post-confirm.adp 13 Aug 2002 03:11:26 -0000 1.2 +++ openacs.org-dev/packages/forums/www/message-post-confirm.adp 4 Sep 2002 03:46:54 -0000 1.3 @@ -13,10 +13,14 @@
- - - - + + + + + + +
Index: openacs.org-dev/packages/forums/www/message-post-confirm.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs.org-dev/packages/forums/www/Attic/message-post-confirm.tcl,v diff -u -r1.1 -r1.2 --- openacs.org-dev/packages/forums/www/message-post-confirm.tcl 20 Aug 2002 19:20:53 -0000 1.1 +++ openacs.org-dev/packages/forums/www/message-post-confirm.tcl 4 Sep 2002 03:46:54 -0000 1.2 @@ -1,56 +1,51 @@ ad_page_contract { + +} { + + message_id:integer + subject + content + parent_id + forum_id + attachments_enabled_p + html_p + subscribe_p + } -properties { - __form_contents__:multirow + } -set __return_url__ [ad_conn url] +# borrowed from acs_templating/resources/forms +# this generates a confirm page from message-post.tcl +# storing all the data in hidden form variables, and asking for attachments +# or notifications if applicable and passes the data back to message-post.tcl +# --DaveB -# The basic idea here is to build a multirow holding the form contents, which then get -# passed back to the form handler transparently as a submission, as though the confirm +# The basic idea here is to build a multirow holding the form contents, +# which then get +# passed back to the form handler transparently as a submission, +# as though the confirm # step never happened. -# There's one exception - we set the special form element "__confirmed_p" true. This -# informs ad_form that the use has indeed confirmed the submission. +# There's one exception - we set the special form element "__confirmed_p" true. +# This informs ad_form that the use has indeed confirmed the submission. -multirow create __form_contents__ __key__ __value__ -if { ![empty_string_p [set __form__ [ns_getform]]] } { +# moved stuff over here from message-post --DaveB +# this sets up the data necessary for the confirm form - set __form_size__ [ns_set size $__form__] - set __form_counter__ 0 - - while { $__form_counter__ < $__form_size__ } { - if { [string equal [ns_set key $__form__ $__form_counter__] __confirmed_p] } { - multirow append __form_contents__ __confirmed_p 1 - } else { - multirow append __form_contents__ [ns_set key $__form__ $__form_counter__] \ - [template::util::quote_html [ns_set value $__form__ $__form_counter__]] - } - incr __form_counter__ - } +set user_id [ad_conn user_id] +# Let's check if this person is subscribed to the forum +# in case we might want to subscribe them to the thread +if {[empty_string_p $parent_id]} { + if {![empty_string_p [notification::request::get_request_id \ + -type_id [notification::type::get_type_id -short_name forums_forum_notif] \ + -object_id $forum_id \ + -user_id [ad_conn user_id]]]} { + set forum_notification_p 1 + } else { + set forum_notification_p 0 + } } -# moved stuff over here from message-post --DaveB -set user_id [ad_conn user_id] - - set message(html_p) $html_p - set message(subject) $subject - set message(content) $content - set message(user_id) $user_id - set message(user_name) [db_string select_name {}] - set message(posting_date) [db_string select_date {}] - - # Let's check if this person is subscribed to the forum - # in case we might want to subscribe them to the thread - if {[empty_string_p $parent_id]} { - if {![empty_string_p [notification::request::get_request_id \ - -type_id [notification::type::get_type_id -short_name forums_forum_notif] \ - -object_id $forum_id \ - -user_id [ad_conn user_id]]]} { - set forum_notification_p 1 - } else { - set forum_notification_p 0 - } - } -