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.42.2.2 -r1.42.2.3 --- openacs-4/packages/acs-templating/tcl/widget-procs.tcl 27 Feb 2007 08:32:40 -0000 1.42.2.2 +++ openacs-4/packages/acs-templating/tcl/widget-procs.tcl 27 Feb 2007 08:51:52 -0000 1.42.2.3 @@ -118,9 +118,9 @@ if { [empty_string_p $value] } { if { [string is true $is_optional] } { - return "" + return "" } else { - 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] } } @@ -279,7 +279,7 @@ set mode {} } - set attributes(id) $element(name) + set attributes(id) $element(name) set output [textarea_internal $element(name) attributes $value $mode] # Spell-checker @@ -376,7 +376,7 @@ # 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"] } { - set attributes(id) "$element(name)" + set attributes(id) "$element(name)" } @@ -392,7 +392,7 @@ if { ![string equal $element(mode) "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)]\"" @@ -898,38 +898,38 @@ foreach option $options { if {$count == 0} { # answer descriptions in a list: {{desc1 no_of_answers} {desc2 no_of_answers} ...} - append output "" - foreach answer_desc $option { - set answer_description [lindex $answer_desc 0] - set no_of_answers [lindex $answer_desc 1] - append output "$answer_description" + append output "" + foreach answer_desc $option { + set answer_description [lindex $answer_desc 0] + set no_of_answers [lindex $answer_desc 1] + append output "$answer_description" + } + append output "" + } elseif {$count == 1} { + append output "[lindex $option 0]" + foreach answer_set [lindex $option 1] { + append output "required?" + foreach answer $answer_set { + append output "$answer" } - append output "" - } elseif {$count == 1} { - append output "[lindex $option 0]" - foreach answer_set [lindex $option 1] { - append output "required?" - foreach answer $answer_set { - append output "$answer" + } + append output "" + } else { + append output "[lindex $option 0]" + foreach question [lindex $option 1] { + set name [lindex $question 0] + set required_p [lindex $question 1] + append output "[ad_decode $required_p "t" "*" " "]" + foreach choice [lindex $question 2] { + if {[lsearch -exact $value $choice]==-1} { + append output "" + } else { + append output "" } } - append output "" - } else { - append output "[lindex $option 0]" - foreach question [lindex $option 1] { - set name [lindex $question 0] - set required_p [lindex $question 1] - append output "[ad_decode $required_p "t" "*" " "]" - foreach choice [lindex $question 2] { - if {[lsearch -exact $value $choice]==-1} { - append output "" - } else { - append output "" - } - } - } - append output "" } + append output "" + } incr count }