Index: openacs-4/packages/ams/tcl/address-widget-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ams/tcl/address-widget-procs.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/ams/tcl/address-widget-procs.tcl 28 Jul 2005 17:05:27 -0000 1.9 +++ openacs-4/packages/ams/tcl/address-widget-procs.tcl 12 Sep 2005 22:09:17 -0000 1.10 @@ -68,7 +68,6 @@ } # Different formats depending on the country - switch $country_code { "US" { set address "$delivery_address @@ -80,9 +79,15 @@ $postal_code $municipality" } default { - set address "$delivery_address -$postal_code $municipality + if { [parameter::get_from_package_key -package_key "ams" -parameter "DefaultAdressLayoutP" -default 1] } { + set address "$delivery_address +$municipality $region $postal_code $country" + } else { + set address "$delivery_address +$postal_code $municipality $region +$country" + } } } return [ad_text_to_html $address] @@ -457,16 +462,32 @@ [_ ams.delivery_address]
- - - - +" + if { [parameter::get_from_package_key -package_key "ams" -parameter "DefaultAdressLayoutP" -default 1] } { + append output " + + + + + + [_ ams.municipality] + [_ ams.region] + [_ ams.postal_code] + " + } else { + append output " + + + + + + [_ ams.postal_code] + [_ ams.municipality] + [_ ams.region] + " + } + append output " - [_ ams.municipality] - [_ ams.region] - [_ ams.postal_code] - - [menu $element(id).country_code [template::util::address::country_options] $country_code attributes] Index: openacs-4/packages/ams/tcl/ams-install-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/ams/tcl/ams-install-procs.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/ams/tcl/ams-install-procs.tcl 9 Sep 2005 17:08:30 -0000 1.1 +++ openacs-4/packages/ams/tcl/ams-install-procs.tcl 12 Sep 2005 22:01:56 -0000 1.2 @@ -29,6 +29,9 @@ } } } + 1.1d3 1.1d4 { + apm_parameter_register "DefaultAdressLayoutP" "Especify the default template for input and display layout for the address. Set to 1 for { street, city, state, zip, country } or 0 for { street, zip, city, state, country }" "ams" "1" "number" "address-widget" + } } }