Index: openacs-4/packages/ams/ams.info =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ams/ams.info,v diff -u -N -r1.25 -r1.26 --- openacs-4/packages/ams/ams.info 14 Jan 2007 11:36:27 -0000 1.25 +++ openacs-4/packages/ams/ams.info 12 Jul 2007 08:24:07 -0000 1.26 @@ -8,14 +8,14 @@ t ams - + Matthew Geddert Store attributes via the Content Repository, and auto generate input forms - 2006-02-17 + 2007-07-12 AMS (Attribute Management System) helps in customizing your website. It lets you adjust what information is collected and displayed for any package that is integrated with it. AMS allows you to easily and dynamically add attributes to forms and display pages, using a Tcl API or an admin interface. AMS uses the content repository to store attribute history for any object on the system. 0 - + @@ -33,8 +33,8 @@ + - Index: openacs-4/packages/ams/catalog/ams.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ams/catalog/ams.en_US.ISO-8859-1.xml,v diff -u -N -r1.27 -r1.28 --- openacs-4/packages/ams/catalog/ams.en_US.ISO-8859-1.xml 14 Jan 2007 11:36:27 -0000 1.27 +++ openacs-4/packages/ams/catalog/ams.en_US.ISO-8859-1.xml 12 Jul 2007 08:24:07 -0000 1.28 @@ -4,7 +4,7 @@ Action Add an AMS Attribute Add Attribute - Add Heading + Add/Stop Section Add Html Options Address AOL Instant Messenger ID @@ -32,6 +32,7 @@ Checkbox - Multiple Options Allowed Citizenship Citizenships + Content Country Andorra United Arab Emirates @@ -281,14 +282,14 @@ Define Widget Degree From Previous School Degree From Previous Schools - Delete Heading + Delete Section Delete Html Options Street Denomination Denominations App Division App Divisions - Edit/Delete Heading + Edit/Delete Section Edit/Delete Html Options Email Enrollment Interest Level @@ -300,10 +301,12 @@ Application Fee Recieved Application Fees Recieved Form Preview + Format Gender Genders has been added as an attribute to - Heading + Section + Stop Previous Section Help text Bachelor's Graduation Year Bachelor's Graduation Years Index: openacs-4/packages/ams/tcl/ams-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ams/tcl/ams-procs.tcl,v diff -u -N -r1.52 -r1.53 --- openacs-4/packages/ams/tcl/ams-procs.tcl 23 Jan 2007 14:43:50 -0000 1.52 +++ openacs-4/packages/ams/tcl/ams-procs.tcl 12 Jul 2007 08:24:08 -0000 1.53 @@ -527,10 +527,14 @@ -html_options $html_options \ -optional_p [string is false $required_p] -attribute_id $attribute_id] - if { [exists_and_not_null section_heading] } { - lappend element [list section $section_heading] - } if { [exists_and_not_null element]} { + if { [exists_and_not_null section_heading] } { + if { $section_heading eq "no_section" } { + lappend element_list {-section ""} + } else { + lappend element_list [list "-section" "sec$attribute_id" [list legendtext $section_heading]] + } + } lappend element_list $element } } 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 Index: openacs-4/packages/ams/www/list.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ams/www/list.tcl,v diff -u -N -r1.10 -r1.11 --- openacs-4/packages/ams/www/list.tcl 25 Sep 2006 15:21:57 -0000 1.10 +++ openacs-4/packages/ams/www/list.tcl 12 Jul 2007 08:24:08 -0000 1.11 @@ -80,7 +80,9 @@ } section_heading { label "[_ ams.Heading]" - display_col section_heading + display_template { + \#ams.Heading_Stop\#@mapped_attributes.section_heading@ + } } html_options { label "[_ ams.Html_options]"