Index: openacs-4/packages/ams/tcl/ams-widget-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ams/tcl/ams-widget-procs.tcl,v diff -u -N -r1.26 -r1.27 --- openacs-4/packages/ams/tcl/ams-widget-procs.tcl 5 Apr 2006 19:22:42 -0000 1.26 +++ openacs-4/packages/ams/tcl/ams-widget-procs.tcl 7 Apr 2006 07:57:42 -0000 1.27 @@ -768,10 +768,10 @@ ad_form_widget { if { [string is true $optional_p] } { set options [concat [list [list "" ""]] $options] - return "${attribute_name}:integer(select),optional {help_text \"$help_text\"} {[list label ${pretty_name}]} {[list html ${html_options}]} {[list options $options]}" + return "${attribute_name}:integer(select),optional {help_text \"$help_text\"} {[list label ${pretty_name}]} {[list html ${html_options}]} {[list options $options]} {[list value [attribute::default_value -attribute_id $attribute_id]]}" } else { set options [concat [list [list "- [_ ams.select_one] -" ""]] $options] - return "${attribute_name}:integer(select) {help_text \"$help_text\"} {[list label ${pretty_name}]} {[list html ${html_options}]} {[list options $options]}" + return "${attribute_name}:integer(select) {help_text \"$help_text\"} {[list label ${pretty_name}]} {[list html ${html_options}]} {[list options $options]} {[list value [attribute::default_value -attribute_id $attribute_id]]}" } } template_form_widget { @@ -846,9 +846,9 @@ switch $request { ad_form_widget { if { [string is true $optional_p] } { - return "${attribute_name}:integer(radio),optional {help_text \"$help_text\"} {[list label ${pretty_name}]} {[list html ${html_options}]} {[list options $options]}" + return "${attribute_name}:integer(radio),optional {help_text \"$help_text\"} {[list label ${pretty_name}]} {[list html ${html_options}]} {[list options $options]} {[list value [attribute::default_value -attribute_id $attribute_id]]}" } else { - return "${attribute_name}:integer(radio) {help_text \"$help_text\"} {[list label ${pretty_name}]} {[list html ${html_options}]} {[list options $options]}" + return "${attribute_name}:integer(radio) {help_text \"$help_text\"} {[list label ${pretty_name}]} {[list html ${html_options}]} {[list options $options]} {[list value [attribute::default_value -attribute_id $attribute_id]]}" } } template_form_widget { @@ -922,9 +922,9 @@ switch $request { ad_form_widget { if { [string is true $optional_p] } { - return "${attribute_name}:integer(checkbox),multiple,optional {help_text \"$help_text\"} {[list label ${pretty_name}]} {[list html ${html_options}]} {[list options $options]}" + return "${attribute_name}:integer(checkbox),multiple,optional {help_text \"$help_text\"} {[list label ${pretty_name}]} {[list html ${html_options}]} {[list options $options]} {[list value [attribute::default_value -attribute_id $attribute_id]]}" } else { - return "${attribute_name}:integer(checkbox),multiple {help_text \"$help_text\"} {[list label ${pretty_name}]} {[list html ${html_options}]} {[list options $options]}" + return "${attribute_name}:integer(checkbox),multiple {help_text \"$help_text\"} {[list label ${pretty_name}]} {[list html ${html_options}]} {[list options $options]} {[list value [attribute::default_value -attribute_id $attribute_id]]}" } } template_form_widget { @@ -1000,9 +1000,9 @@ switch $request { ad_form_widget { if { [string is true $optional_p] } { - return "${attribute_name}:integer(multiselect),multiple,optional {help_text \"$help_text\"} {[list label ${pretty_name}]} {[list html ${html_options}]} {[list options $options]}" + return "${attribute_name}:integer(multiselect),multiple,optional {help_text \"$help_text\"} {[list label ${pretty_name}]} {[list html ${html_options}]} {[list options $options]} {[list value [attribute::default_value -attribute_id $attribute_id]]}" } else { - return "${attribute_name}:integer(multiselect),multiple {help_text \"$help_text\"} {[list label ${pretty_name}]} {[list html ${html_options}]} {[list options $options]}" + return "${attribute_name}:integer(multiselect),multiple {help_text \"$help_text\"} {[list label ${pretty_name}]} {[list html ${html_options}]} {[list options $options]} {[list value [attribute::default_value -attribute_id $attribute_id]]}" } } template_form_widget {