Index: openacs-4/packages/acs-templating/tcl/form-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/form-procs.tcl,v diff -u -r1.36 -r1.37 --- openacs-4/packages/acs-templating/tcl/form-procs.tcl 29 Aug 2007 14:01:33 -0000 1.36 +++ openacs-4/packages/acs-templating/tcl/form-procs.tcl 25 Sep 2007 15:22:39 -0000 1.37 @@ -411,12 +411,21 @@ } { get_reference + # legend can't be empty + if { ![string equal $section ""] && [string equal $legendtext ""] } { + ns_log Warning "template::form::section (form: $id, section: $section): The section legend is empty. You must provide text for the legend otherwise the section fieldset won't be created." + return + } + set properties(section) $section set properties(sec_legendtext) $legendtext # fieldset attributes set properties(sec_fieldset) "" array set fs_attributes $fieldset + if {![info exists fs_attributes(class)]} { + append properties(sec_fieldset) " class=\"form-fieldset\"" + } foreach name [array names fs_attributes] { if { [string equal $fs_attributes($name) {}] } { append properties(sec_fieldset) " $name" @@ -574,19 +583,22 @@ if { [info exists properties(fieldset)] } { # Fieldset append output " " # Legend - set fieldset_legend [lindex $fieldset_list 1] + set fieldset_legend [lindex $properties(fieldset) 1] append output "$fieldset_legend" - - } else { - append output "
" } # Export form ID and current form mode