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 -N -r1.44 -r1.45 --- openacs-4/packages/acs-templating/tcl/widget-procs.tcl 10 Jan 2007 21:22:12 -0000 1.44 +++ openacs-4/packages/acs-templating/tcl/widget-procs.tcl 14 May 2007 20:30:27 -0000 1.45 @@ -72,11 +72,11 @@ } else { - set output "" - append output "" + set output "" + append output "" if { ![info exists element(confirmed_p)] } { - append output "" + append output "" } append output [select $element_reference $tag_attributes] @@ -239,7 +239,7 @@ # include an extra hidden element to indicate that the # value is being selected as opposed to entered - set output "\n" + set output "\n" append output [select element $tag_attributes] } @@ -282,7 +282,7 @@ set mode {} } - + set attributes(id) $element(name) set output [textarea_internal $element(name) attributes $value $mode] # Spell-checker @@ -378,7 +378,10 @@ if { ( $type eq "checkbox" || $type eq "radio" ) && [info exists element(value)] } { # This can be used in the form template in a tag. set attributes(id) "$element(form_id):elements:$element(name):$element(value)" + } elseif { [string equal $type "password"] || [string equal $type "text"] || [string equal $type "button"] || [string equal $type "file"]} { + set attributes(id) "$element(name)" } + # Handle display mode of visible normal form elements, i.e. not hidden, not submit, not button, not clear if { $element(mode) ne "edit" && [lsearch -exact { hidden submit button clear checkbox radio } $type] == -1 } { @@ -392,7 +395,7 @@ if { $element(mode) ne "edit" && [lsearch -exact { hidden submit button clear } $type] == -1 } { append output " disabled" - } + } if { [info exists element(value)] } { append output " value=\"[template::util::quote_html $element(value)]\"" @@ -410,7 +413,7 @@ append output " maxlength=\"$element(maxlength)\"" } - append output " />" + append output " >" } return $output @@ -654,11 +657,11 @@ append output " selected=\"selected\"" } - append output ">$label
\n" + append output ">$label
\n" } } default { - append output "