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.43 -r1.43.2.1 --- openacs-4/packages/acs-templating/tcl/form-procs.tcl 7 Jan 2010 10:32:23 -0000 1.43 +++ openacs-4/packages/acs-templating/tcl/form-procs.tcl 7 Apr 2010 13:58:39 -0000 1.43.2.1 @@ -33,6 +33,7 @@ @see template::form::get_button @see template::form::get_action @see template::form::set_properties + @see template::form::get_properties @see template::form::exists @see template::form::export @see template::form::get_combined_values @@ -153,8 +154,8 @@ # If the user hit a button named "cancel", redirect and about if { $submission && $formbutton eq "cancel" && [exists_and_not_null opts(cancel_url)]} { - ad_returnredirect $opts(cancel_url) - ad_script_abort + ad_returnredirect $opts(cancel_url) + ad_script_abort } set formaction [get_action $id] @@ -194,6 +195,25 @@ template::util::get_opts $args } +ad_proc -public template::form::get_properties { id } { + Get properties of a form + + @param id The ID of a form +} { + set level [template::adp_level] + + # form properties + upvar #$level $id:properties formprop + + if { [info exists formprop] } { + # properties exist in the form, return them + return [array get formprop] + } else { + # no props exist in the form, return the empty list + return [list] + } +} + ad_proc -public template::form::get_button { id } { Find out which button was clicked