Index: openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl,v
diff -u -r1.68 -r1.69
--- openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 8 Feb 2004 17:22:07 -0000 1.68
+++ openacs-4/packages/acs-tcl/tcl/utilities-procs.tcl 25 Feb 2004 18:18:22 -0000 1.69
@@ -568,7 +568,7 @@
ad_proc -public db_html_select_value_options {
{ -bind "" }
- { -select_option "" }
+ { -select_option [list] }
{ -value_index 0 }
{ -option_index 1 }
stmt_name
@@ -577,7 +577,9 @@
Generate html option tags with values for an html selection widget. if
select_option is passed and there exists a value for it in the values
- list, this option will be marked as selected.
+ list, this option will be marked as selected. select_option can be passed
+ a list, in which case all options matching a value in the list will be
+ marked as selected.
@author yon [yon@arsdigita.com]
@@ -591,7 +593,7 @@
}
foreach option $options {
- if { [string compare $select_option [lindex $option $value_index]] == 0 } {
+ if { [lsearch -exact $select_option [lindex $option $value_index]] >= 0 } {
append select_options "\n"
} else {
append select_options "\n"