Index: openacs-4/contrib/packages/simulation/www/simplay/message.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simplay/Attic/message.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/contrib/packages/simulation/www/simplay/message.tcl 5 Jan 2004 17:05:07 -0000 1.9 +++ openacs-4/contrib/packages/simulation/www/simplay/message.tcl 6 Jan 2004 09:34:17 -0000 1.10 @@ -99,6 +99,7 @@ set focus "message.recipient_role_id" } +ds_comment [llength $attachment_options] ad_form -extend -name message -form { {recipient_role_id:integer(checkbox),multiple @@ -113,11 +114,22 @@ {label "Body"} {html {cols 60 rows 20}} } - {attachments:integer(checkbox),multiple,optional - {label "Attachments"} - {options $attachment_options} +} + +if { [llength $attachment_options] > 0 } { + ad_form -extend -name message -form { + {attachments:integer(checkbox),multiple,optional + {label "Attachments"} + {options $attachment_options} + } } -} -new_request { +} else { + ad_form -extend -name message -form { + {attachments:integer(hidden),optional} + } +} + +ad_form -extend -name message -new_request { if { [info exists body_text] } { if { ![info exists body_mime_type] } { set body_mime_type "text/enhanced"