X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fmisc%2Fconfirm-censustract.html;h=f3fd0383ecfad8a5672c480c1c65dc6d579bd9c5;hb=850f7e02ff0ca9f3514989d7d6c2a0ab96ac4e06;hp=880cade3a3086db37755be40fbf283036ba3b13a;hpb=777a6997a004dc4ea99bccabe494f77f114db1a3;p=freeside.git
diff --git a/httemplate/misc/confirm-censustract.html b/httemplate/misc/confirm-censustract.html
index 880cade3a..f3fd0383e 100644
--- a/httemplate/misc/confirm-censustract.html
+++ b/httemplate/misc/confirm-censustract.html
@@ -1,3 +1,10 @@
+% if ( !$error and !$new_tract ) {
+% # then set_censustract returned nothing
+% # because it's not relevant for this address
+% # so output nothing (forces confirm_censustract() to continue)
+% $m->clear_buffer;
+% $m->abort;
+% }
-% my $querystring = "census_year=$year&latitude=".$cache->get('latitude').'&longitude='.$cache->get('longitude');
-Map service module location
-% $querystring = "census_year=$year&zip_code=".$cache->get('zip');
-Map zip code center
+% my $querystring = "census_year=$year&address=$location{address1}, $location{address2}, $location{city}, $location{state}";
+Map service module location
+% $querystring = "census_year=$year&pre=$pre&zip_code=" . $cache->get('zip');
+Map zip code center
+
Entered census tract
@@ -24,9 +36,9 @@ Confirm census tract
<% $old_tract %>
% if ( $error ) {
-
<% $error %>
+
<% $error %>
% } else {
-
<% $new_tract %>
+
<% $new_tract %>
% }
@@ -36,30 +48,43 @@ Confirm census tract
Use entered census tract
-% if ( !$error ) {
-
-
-
-
+
+
- Cancel submission
+ Cancel submission
+
-% } else { # don't show a button to use the calculated value
-
+
+
+
- Cancel submission
+ Cancel submission
+
-% }
+
<%init>
local $SIG{__DIE__}; #disable Mason error trap
@@ -82,7 +107,7 @@ my %location = (
my $old_tract = $q->{$pre.'censustract'};
my $cache = eval { FS::GeocodeCache->new(%location) };
$cache->set_censustract;
-my $year = FS::Conf->new->config('census_year');
+my $year = FS::Conf->new->config('census_legacy') || '2020';
my $new_tract = $cache->get('censustract');
my $error = $cache->get('censustract_error');