Index: openacs-4/packages/ams/www/list-attribute-section-heading.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ams/www/list-attribute-section-heading.tcl,v diff -u -N -r1.3 -r1.4 --- openacs-4/packages/ams/www/list-attribute-section-heading.tcl 28 May 2005 15:37:27 -0000 1.3 +++ openacs-4/packages/ams/www/list-attribute-section-heading.tcl 12 Jul 2007 08:24:08 -0000 1.4 @@ -32,13 +32,23 @@ ad_form -name list_form -form { list_id:integer(hidden) attribute_id:integer(hidden) - {section_heading:text {label "[_ ams.Heading]"} {html {size 40 maxlength 200}}} + {section_heading:text,optional {label "[_ ams.Heading]"} {html {size 40 maxlength 200}}} + {no_section:integer(checkbox),optional {label ""} {options {{{[_ ams.Heading_Stop]} 1}}}} {save:text(submit) {label "[_ acs-kernel.common_Save]"}} {delete:text(submit) {label "[_ ams.Delete_Heading]"}} } -on_request { + if { $section_heading eq "no_section" } { + set section_heading "" + set no_section "1" + } } -on_submit { + set section_heading [string trim $section_heading] if { [string is true [exists_and_not_null delete]] } { set section_heading "" + } elseif { $no_section eq "1" } { + if { $section_heading eq "" } { + set section_heading "no_section" + } } db_dml update_section_heading { update ams_list_attribute_map