Index: openacs-4/packages/acs-templating/resources/forms/standard.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/resources/forms/standard.adp,v diff -u -N -r1.17.6.4 -r1.17.6.5 --- openacs-4/packages/acs-templating/resources/forms/standard.adp 27 Feb 2007 09:17:06 -0000 1.17.6.4 +++ openacs-4/packages/acs-templating/resources/forms/standard.adp 3 Mar 2007 00:19:23 -0000 1.17.6.5 @@ -1,7 +1,9 @@ -
- @elements.section@ +
+ + @elements.sec_legendtext@ + @@ -121,16 +123,6 @@ -
+
- - - - - - #acs-templating.required# <% break %> - - - - Index: openacs-4/packages/acs-templating/tcl/element-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/element-procs.tcl,v diff -u -N -r1.25.6.1 -r1.25.6.2 --- openacs-4/packages/acs-templating/tcl/element-procs.tcl 26 Feb 2007 18:22:06 -0000 1.25.6.1 +++ openacs-4/packages/acs-templating/tcl/element-procs.tcl 3 Mar 2007 00:19:23 -0000 1.25.6.2 @@ -173,6 +173,11 @@ # set the form section set opts(section) $form_properties(section) + if { ![string equal $opts(section) ""] } { + set opts(sec_fieldset) $form_properties(sec_fieldset) + set opts(sec_legend) $form_properties(sec_legend) + set opts(sec_legendtext) $form_properties(sec_legendtext) + } template::util::get_opts $args 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 -N -r1.32.6.2 -r1.32.6.3 --- openacs-4/packages/acs-templating/tcl/form-procs.tcl 17 Feb 2007 23:28:55 -0000 1.32.6.2 +++ openacs-4/packages/acs-templating/tcl/form-procs.tcl 3 Mar 2007 00:19:23 -0000 1.32.6.3 @@ -385,19 +385,53 @@ return [template::adp_eval code] } -ad_proc -public template::form::section { id section } { - Set the name of the current section of the form. A form may be - divided into any number of sections for layout purposes. Elements - are tagged with the current section name as they are added to the - form. A form style template may insert a divider in the form - whenever the section name changes. +ad_proc -public template::form::section { + {-fieldset ""} + {-legendtext ""} + {-legend ""} + id + section +} { + Set the current section (fieldset) of the form. A form may be + divided into any number of fieldsets to group related + elements. Elements are tagged with the current fieldset properties + as they are added to the form. A form style template may insert a + divider in the form whenever the fieldset identifier changes. - @param id The form identifier. - @param section The name of the current section. + @param id The form identifier. + @param section The current fieldset identifier + @param fieldset A list of name-value attribute pairs for the FIELDSET tag + @param legendtext The legend text + @param legend A list of name-value attribute pairs for the LEGEND tag } { - get_reference + get_reference - set properties(section) $section + set properties(section) $section + set properties(sec_legendtext) $legendtext + + # fieldset attributes + set properties(sec_fieldset) "" + array set fs_attributes $fieldset + foreach name [array names fs_attributes] { + if { [string equal $fs_attributes($name) {}] } { + append properties(sec_fieldset) " $name" + } else { + append properties(sec_fieldset) " $name=\"$fs_attributes($name)\"" + } + } + + # legend attributes + set properties(sec_legend) "" + if { ![string eq $legendtext ""] } { + array set lg_attributes $legend + foreach name [array names lg_attributes] { + if { [string equal $lg_attributes($name) {}] } { + append properties(sec_legend) " $name" + } else { + append properties(sec_legend) " $name=\"$lg_attributes($name)\"" + } + } + } } ad_proc -private template::form::render { id tag_attributes } {