Index: openacs-4/packages/ams/www/list-attribute-html-options-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ams/www/list-attribute-html-options-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ams/www/list-attribute-html-options-postgresql.xql 22 Nov 2005 16:50:40 -0000 1.1 @@ -0,0 +1,29 @@ + + + + + + select + alam.html_options + from + ams_list_attribute_map alam, + ams_attributes aa, + ams_lists al + where + alam.attribute_id = aa.attribute_id + and alam.list_id = al.list_id + and alam.list_id = :list_id + and alam.attribute_id = :attribute_id + + + + + + update ams_list_attribute_map + set html_options = :html_options + where list_id = :list_id + and attribute_id = :attribute_id + + + + \ No newline at end of file Index: openacs-4/packages/ams/www/list-attribute-html-options.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ams/www/list-attribute-html-options.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ams/www/list-attribute-html-options.adp 22 Nov 2005 16:50:40 -0000 1.1 @@ -0,0 +1,5 @@ + +@page_title;noquote@ +@context;noquote@ + + \ No newline at end of file Index: openacs-4/packages/ams/www/list-attribute-html-options.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ams/www/list-attribute-html-options.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/ams/www/list-attribute-html-options.tcl 22 Nov 2005 16:50:40 -0000 1.1 @@ -0,0 +1,52 @@ +ad_page_contract { + Page that allows you to add html_options to an specific + attribute_id for an specific list_id + + @author Miguel Marin (miguelmarin@viaro.net) + @author Viaro Networks www.viaro.net + @creation-date 2005-11-21 +} { + list_id:integer,notnull + attribute_id:integer,notnull + return_url:optional +} + +set page_title "[_ ams.Html_options]" +set context [list [list "[get_referrer]" "[_ ams.AMS_Lists]"] $page_title] + +if { ![exists_and_not_null return_url] } { + set return_url [get_referrer] +} + +ad_form -name html_options -form { + {return_url:text(hidden) + {value $return_url} + } + {list_id:text(hidden) + {value $list_id} + } + {attribute_id:text(hidden) + {value $attribute_id} + } + {html_options:text(text) + {label "[_ ams.Html_options]"} + {html {size 80 maxlength 1000}} + {help_text "[_ ams.Html_options_help]"} + } + {save:text(submit) {label "[_ acs-kernel.common_Save]"}} + {delete:text(submit) {label "[_ ams.Delete_html]"}} +} -on_request { + # Get the html_options + db_0or1row get_html_options { } + +} -on_submit { + if { [string is true [exists_and_not_null delete]] } { + set html_options "" + } + db_dml update_html_options { } +} -after_submit { + ad_returnredirect $return_url + ad_script_abort +} + +ad_return_template \ No newline at end of file