Index: openacs-4/packages/acs-templating/tcl/widget-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/widget-procs.tcl,v
diff -u -r1.38 -r1.39
--- openacs-4/packages/acs-templating/tcl/widget-procs.tcl 3 May 2005 10:26:04 -0000 1.38
+++ openacs-4/packages/acs-templating/tcl/widget-procs.tcl 3 May 2005 21:23:37 -0000 1.39
@@ -437,16 +437,17 @@
values_list
attribute_reference
{mode edit}
+ {widget_type select}
} {
upvar $attribute_reference attributes
# Create an array for easier testing of selected values
template::util::list_to_lookup $values_list values
+ set output {}
if { ![string equal $mode "edit"] } {
set selected_list [list]
- set output {}
foreach option $options_list {
@@ -461,32 +462,52 @@
append output [join $selected_list ", "]
} else {
+ switch -exact -- $widget_type {
+ checkbox -
+ radio {
+ if {[info exists attributes(multiple)]} {
+ set widget_type radio
+ }
+ foreach option $options_list {
-
- set output ""
}
return $output
@@ -547,8 +568,8 @@
if { [info exists element(options)] } {
unset element(options)
}
- template::element::set_error $element(form_id) $element_id "
- Please enter a search string."
+ template::element::set_error $element(form_id) $element_id \
+ "Please enter a search string."
return [list]
}
@@ -574,9 +595,8 @@
unset element(options)
}
- template::element::set_error $element(form_id) $element_id "
- No matches were found for \"$value\".
Please
- try again."
+ template::element::set_error $element(form_id) $element_id \
+ "No matches were found for \"$value\".
Please\ntry again."
} elseif { $option_count == 1 } {
@@ -587,9 +607,8 @@
# need to return a select list
set element(options) [concat $options { { "Search again..." ":search:" } }]
- template::element::set_error $element(form_id) $element_id "
- More than one match was found for \"$value\".
Please
- choose one from the list."
+ template::element::set_error $element(form_id) $element_id \
+ "More than one match was found for \"$value\".
Please\nchoose one from the list."
set value [lindex [lindex $options 0] 1]
}
@@ -691,8 +710,8 @@
}
incr count
}
+
return "