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.16 -r1.17
--- openacs-4/packages/acs-templating/tcl/widget-procs.tcl 13 Jan 2003 15:23:50 -0000 1.16
+++ openacs-4/packages/acs-templating/tcl/widget-procs.tcl 27 Jan 2003 13:55:09 -0000 1.17
@@ -38,42 +38,61 @@
upvar $element_reference element
- if { ![string equal $element(mode) "edit"] } {
+ if { [info exists element(html)] } {
+ array set attributes $element(html)
+ }
+ array set attributes $tag_attributes
+
+ if { [info exists element(value)] } {
+ set value $element(value)
+ } else {
+ set value {}
+ }
+
+ if { [info exists element(mode)] } {
+ set mode $element(mode)
+ } else {
+ set mode {}
+ }
+
+
+ set output [textarea_internal $element(name) attributes $value $mode]
+
+ return $output
+}
+
+ad_proc -public template::widget::textarea_internal {
+ name
+ attribute_reference
+ {value {}}
+ {mode edit}
+} {
+ upvar $attribute_reference attributes
+
+ if { ![string equal $mode "edit"] } {
set output {}
- if { [info exists element(value)] } {
- append output [ad_quotehtml $element(value)]
- append output ""
+ if { ![empty_string_p value] } {
+ append output "[ad_quotehtml $value]"
}
} else {
- if { [info exists element(html)] } {
- array set attributes $element(html)
- }
+ set output ""
+ append output ">[ad_quotehtml $value]"
}
return $output
}
+
+
ad_proc -public template::widget::inform { element_reference tag_attributes } {
A static information widget that does not submit any data
} {
@@ -208,8 +227,13 @@
return [input button element $tag_attributes]
}
-ad_proc -public template::widget::menu { widget_name options_list values_list \
- attribute_reference {mode edit} } {
+ad_proc -public template::widget::menu {
+ widget_name
+ options_list
+ values_list
+ attribute_reference
+ {mode edit}
+} {
upvar $attribute_reference attributes