Index: openacs-4/contrib/packages/simulation/www/siminst/map-tasks.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/map-tasks.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/contrib/packages/simulation/www/siminst/map-tasks.tcl 12 Jan 2004 11:35:33 -0000 1.10 +++ openacs-4/contrib/packages/simulation/www/siminst/map-tasks.tcl 13 Jan 2004 12:45:09 -0000 1.11 @@ -18,6 +18,9 @@ set prop_options [simulation::object::get_object_type_options -object_type "sim_prop" -null_label "--Not Yet Selected--"] +set prop_count [llength $prop_options] +set missing_props_p 0 + set actions [list] db_foreach tasks { @@ -61,8 +64,13 @@ {value $row(attachment_num)}]] for { set i 1 } { $i <= $row(attachment_num) } { incr i } { + if { $prop_count == "1" } { + set missing_props_p 1 + break + } + ad_form -extend -name tasks -form \ - [list [list attachment_$row(action_id)_$i:integer(select),optional \ + [list [list attachment_$row(action_id)_${i}:integer(select) \ {label "Attachment $i"} \ {options $prop_options} \ {help_text "Select from existing attachments or