Index: openacs-4/packages/contacts/lib/letter.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/letter.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/contacts/lib/letter.tcl 27 Jul 2005 14:07:35 -0000 1.7 +++ openacs-4/packages/contacts/lib/letter.tcl 9 Aug 2005 12:44:19 -0000 1.8 @@ -16,6 +16,31 @@ } } +if {[exists_and_not_null header_id]} { + contact::message::get -item_id $header_id -array header_info + set header [ad_html_text_convert \ + -to "text/html" \ + -from $header_info(content_format) \ + -- $header_info(content) \ + ] +} else { + set header "
{name}
+{mailing_address}
" +} + +if {[exists_and_not_null footer_id]} { + contact::message::get -item_id $footer_id -array footer_info + set footer [ad_html_text_convert \ + -to "text/html" \ + -from $footer_info(content_format) \ + -- $footer_info(content) \ + ] +} else { + set footer "" +} + + + set date [split [dt_sysdate] "-"] append form_elements { message_id:key @@ -33,16 +58,21 @@ {date:date(date) {label "[_ contacts.Date]"} } - {address:text(inform),optional - {label "[_ contacts.Address]"} - {value "{name}
{mailing_address}"} + {header:text(inform),optional + {label "[_ contacts.Header]"} + {value "$header"} {help_text {[_ contacts.lt_The_recipeints_name_a]}} } {content:richtext(richtext) {label "[_ contacts.Message]"} {html {cols 70 rows 24}} {help_text {[_ contacts.lt_remember_that_you_can]}} } + {footer:text(inform),optional + {label "[_ contacts.Footer]"} + {value "$footer"} + {help_text {[_ contacts.lt_The_recipeints_name_a]}} + } } ad_form -action message \ @@ -116,13 +146,23 @@ break } - set letter "
-
$name
-$mailing_address
-
$content
+ set letter " + + + + + + + +" -" - set values [list] foreach element [list first_names last_name name mailing_address date salutation] { lappend values [list "{$element}" [set $element]]
+$header +

+
+$content +
+$footer +