From 0f0bc1ef7aafc6b3869c0f71ee2528c1c9897ce6 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Wed, 26 Nov 2014 16:55:41 -0800 Subject: don't look up or display census tracts for non-U.S. addresses, #32249 --- httemplate/elements/standardize_locations.js | 13 +++++++++---- httemplate/elements/tr-censustract.html | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) (limited to 'httemplate/elements') 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) { <% mt('Census tract') |h %> -- cgit v1.2.1