summaryrefslogtreecommitdiff
path: root/httemplate/elements
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2014-11-26 16:55:41 -0800
committerMark Wells <mark@freeside.biz>2014-11-26 16:55:41 -0800
commit0f0bc1ef7aafc6b3869c0f71ee2528c1c9897ce6 (patch)
treeb7a70adbcac67c46bff79f0930d5a6ed2104a73f /httemplate/elements
parent79df9da17cf54366ef027a941c131cb1a016068e (diff)
don't look up or display census tracts for non-U.S. addresses, #32249
Diffstat (limited to 'httemplate/elements')
-rw-r--r--httemplate/elements/standardize_locations.js13
-rw-r--r--httemplate/elements/tr-censustract.html2
2 files changed, 10 insertions, 5 deletions
diff --git a/httemplate/elements/standardize_locations.js b/httemplate/elements/standardize_locations.js
index 817a2e357..a4f13d78d 100644
--- a/httemplate/elements/standardize_locations.js
+++ b/httemplate/elements/standardize_locations.js
@@ -290,10 +290,15 @@ function confirm_censustract() {
'<%$p%>/misc/confirm-censustract.html',
'q=' + encodeURIComponent(JSON.stringify(address_info)),
function() {
- overlib( OLresponseAJAX, CAPTION, 'Confirm censustract', STICKY,
- AUTOSTATUSCAP, CLOSETEXT, '', MIDX, 0, MIDY, 0, DRAGGABLE, WIDTH,
- 576, HEIGHT, 268, BGCOLOR, '#333399', CGCOLOR, '#333399',
- TEXTSIZE, 3 );
+ if ( OLresponseAJAX ) {
+ overlib( OLresponseAJAX, CAPTION, 'Confirm censustract', STICKY,
+ AUTOSTATUSCAP, CLOSETEXT, '', MIDX, 0, MIDY, 0, DRAGGABLE, WIDTH,
+ 576, HEIGHT, 268, BGCOLOR, '#333399', CGCOLOR, '#333399',
+ TEXTSIZE, 3 );
+ } else {
+ // no response
+ <% $post_censustract %>;
+ }
},
0);
} else {
diff --git a/httemplate/elements/tr-censustract.html b/httemplate/elements/tr-censustract.html
index bd014f11b..7a4b34943 100644
--- a/httemplate/elements/tr-censustract.html
+++ b/httemplate/elements/tr-censustract.html
@@ -1,4 +1,4 @@
-% if ($censustract) {
+% if ($location->country eq 'US' and $censustract) {
<TR>
<TD ALIGN="right"><% mt('Census tract') |h %></TD>
<TD COLSPAN=5>