Index: openacs-4/packages/acs-templating/resources/forms/coddo.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/resources/forms/coddo.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-templating/resources/forms/coddo.adp 4 Jun 2003 01:38:34 -0000 1.5 +++ openacs-4/packages/acs-templating/resources/forms/coddo.adp 22 Sep 2003 17:42:56 -0000 1.6 @@ -23,15 +23,19 @@ - - - + + + + + + + - @elements.label@ + @elements.label;noquote@
  
@@ -95,15 +99,5 @@ - - - - - - - - - - Index: openacs-4/packages/acs-templating/resources/forms/configuration.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/resources/forms/configuration.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/acs-templating/resources/forms/configuration.adp 28 Aug 2003 09:41:45 -0000 1.2 +++ openacs-4/packages/acs-templating/resources/forms/configuration.adp 22 Sep 2003 17:42:56 -0000 1.3 @@ -31,7 +31,9 @@ - + + + @@ -92,10 +94,3 @@ - - - - - - - Index: openacs-4/packages/acs-templating/resources/forms/grid.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/resources/forms/grid.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/acs-templating/resources/forms/grid.adp 13 Jan 2003 15:23:30 -0000 1.4 +++ openacs-4/packages/acs-templating/resources/forms/grid.adp 22 Sep 2003 17:42:56 -0000 1.5 @@ -68,24 +68,13 @@ - - - - - - - - - - - - - - - - - - + + + + + + +
Index: openacs-4/packages/acs-templating/resources/forms/plain.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/resources/forms/plain.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/acs-templating/resources/forms/plain.adp 4 Jun 2003 01:38:34 -0000 1.6 +++ openacs-4/packages/acs-templating/resources/forms/plain.adp 22 Sep 2003 17:42:56 -0000 1.7 @@ -19,13 +19,15 @@ - + + + - @elements.label@   + @elements.label;noquote@  
  
@@ -50,8 +52,8 @@
- - + + @@ -77,14 +79,4 @@ - - - - - - - - - - Index: openacs-4/packages/acs-templating/resources/forms/plainest.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/resources/forms/plainest.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/acs-templating/resources/forms/plainest.adp 4 Jun 2003 01:38:34 -0000 1.5 +++ openacs-4/packages/acs-templating/resources/forms/plainest.adp 22 Sep 2003 17:42:56 -0000 1.6 @@ -25,13 +25,15 @@ - + + + - @elements.label@   + @elements.label;noquote@  
  
@@ -82,16 +84,6 @@ - - - - - - - - - - Index: openacs-4/packages/acs-templating/resources/forms/standard-lars.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/resources/forms/Attic/standard-lars.adp,v diff -u -r1.18 -r1.19 --- openacs-4/packages/acs-templating/resources/forms/standard-lars.adp 16 Sep 2003 10:03:57 -0000 1.18 +++ openacs-4/packages/acs-templating/resources/forms/standard-lars.adp 22 Sep 2003 17:42:56 -0000 1.19 @@ -25,14 +25,13 @@ - - - - + + + + - @@ -127,16 +126,6 @@ - - - - - - - - - - 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 -r1.7 -r1.8 --- openacs-4/packages/acs-templating/resources/forms/standard.adp 4 Jun 2003 01:38:34 -0000 1.7 +++ openacs-4/packages/acs-templating/resources/forms/standard.adp 22 Sep 2003 17:42:56 -0000 1.8 @@ -24,9 +24,13 @@ - - - + + + + + + + @@ -86,16 +90,6 @@ - - - - - - - - - - Index: openacs-4/packages/acs-templating/resources/forms/tiny-plain.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/resources/forms/tiny-plain.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/acs-templating/resources/forms/tiny-plain.adp 4 Jun 2003 01:38:34 -0000 1.3 +++ openacs-4/packages/acs-templating/resources/forms/tiny-plain.adp 22 Sep 2003 17:42:56 -0000 1.4 @@ -16,9 +16,11 @@ - - - + + + + + @@ -37,7 +39,7 @@ - @elements.label@ + @elements.label;noquote@    @@ -111,14 +113,5 @@ - - - - - - - - - Index: openacs-4/packages/acs-templating/resources/forms/wizard.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/resources/forms/wizard.adp,v diff -u -r1.7 -r1.8 --- openacs-4/packages/acs-templating/resources/forms/wizard.adp 4 Jun 2003 01:38:34 -0000 1.7 +++ openacs-4/packages/acs-templating/resources/forms/wizard.adp 22 Sep 2003 17:42:56 -0000 1.8 @@ -100,18 +100,11 @@ - - - - - - - - - - - - + + + + + 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.16 -r1.17 --- openacs-4/packages/acs-templating/tcl/form-procs.tcl 10 Sep 2003 15:02:57 -0000 1.16 +++ openacs-4/packages/acs-templating/tcl/form-procs.tcl 22 Sep 2003 17:42:56 -0000 1.17 @@ -295,25 +295,10 @@ @return A string containing a template for the body of the form. } { + get_reference # - # Elements - # - - - set elements:rowcount 0 - - foreach element_ref $elements { - - incr elements:rowcount - - # get a reference by index for the multirow data source - upvar #$level $element_ref elements:${elements:rowcount} - set "elements:${elements:rowcount}(rownum)" ${elements:rowcount} - } - - # # Buttons # @@ -340,20 +325,35 @@ set buttons:rowcount 0 foreach button $form_properties(${form_properties(mode)}_buttons) { - incr buttons:rowcount - set label [lindex $button 0] set name [lindex $button 1] if { [string equal $name "ok"] } { # We hard-code the OK button to be wider than it otherwise would - set "buttons:${buttons:rowcount}(label)" " $label " - } else { - set "buttons:${buttons:rowcount}(label)" $label + set label " $label " } - set "buttons:${buttons:rowcount}(name)" "formbutton:$name" + set name "formbutton:$name" + + template::element create $id $name -widget submit -label $label } - + + # + # Elements + # RAL: moved this below so we could take advantage of the template::element + # API in the button loop above. The buttons multirow in standard.adp is + # no longer necessary. + # + set elements:rowcount 0 + + foreach element_ref $elements { + + incr elements:rowcount + + # get a reference by index for the multirow data source + upvar #$level $element_ref elements:${elements:rowcount} + set "elements:${elements:rowcount}(rownum)" ${elements:rowcount} + } + if { [string equal $style {}] } { set style [parameter::get \ -package_id [ad_conn subsite_id] \ @@ -397,7 +397,12 @@ @return A string containing the HTML for the body of the form. } { - set __adp_output [template $id $style] + if { [catch { + set __adp_output [template $id $style] + }] } { + set style "standard" + set __adp_output [template $id $style] + } set level [template::adp_level]