Index: openacs-4/packages/ams/ams.info
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/ams/ams.info,v
diff -u -r1.20 -r1.21
--- openacs-4/packages/ams/ams.info 10 Feb 2006 01:25:55 -0000 1.20
+++ openacs-4/packages/ams/ams.info 17 Feb 2006 20:06:25 -0000 1.21
@@ -8,14 +8,14 @@
t
ams
-
+
Matthew Geddert
Store attributes via the Content Repository, and auto generate input forms
- 2005-11-21
+ 2006-02-17
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
-
+
@@ -32,6 +32,7 @@
+
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.13 -r1.14
--- openacs-4/packages/ams/tcl/address-widget-procs.tcl 30 Jan 2006 22:44:59 -0000 1.13
+++ openacs-4/packages/ams/tcl/address-widget-procs.tcl 17 Feb 2006 20:06:25 -0000 1.14
@@ -51,32 +51,39 @@
# There is no HTTP connection - resort to system locale
set locale [lang::system::locale]
}
- set key "ams.country_${country_code}"
- if { [string is true [lang::message::message_exists_p $locale $key]] } {
- set country [lang::message::lookup $locale $key]
- } else {
- # cache the country codes
- template::util::address::country_options_not_cached -locale $locale
- if { [string is true [lang::message::message_exists_p $locale $key]] } {
- set country [lang::message::lookup $locale $key]
- } else {
- # we get the default en_US key which was created with the
- # template::util::address::country_options_not_cached proc
- set country [lang::message::lookup "en_US" $key]
- }
+ if { [lsearch [parameter::get_from_package_key -package_key "ams" -parameter "HideISOCountryCode" -default {}] $country_code] >= 0 } {
+ set country ""
+ } else {
+ set key "ams.country_${country_code}"
+ if { [string is true [lang::message::message_exists_p $locale $key]] } {
+ set country [lang::message::lookup $locale $key]
+ } else {
+ # cache the country codes
+ template::util::address::country_options_not_cached -locale $locale
+
+ if { [string is true [lang::message::message_exists_p $locale $key]] } {
+ set country [lang::message::lookup $locale $key]
+ } else {
+ # we get the default en_US key which was created with the
+ # template::util::address::country_options_not_cached proc
+ set country [lang::message::lookup "en_US" $key]
+ }
+ }
}
+
# Different formats depending on the country
switch $country_code {
- "US" {
+ "US" - "CA" {
set address "$delivery_address
$municipality, $region $postal_code
$country"
}
"DE" {
set address "$delivery_address
-$postal_code $municipality"
+$postal_code $municipality
+$country"
}
default {
if { [parameter::get_from_package_key -package_key "ams" -parameter "DefaultAdressLayoutP" -default 1] } {
@@ -90,6 +97,8 @@
}
}
}
+ # now we remove the ending country line if no country exists
+ set address [string trim $address]
return [ad_text_to_html $address]
}