From 468c9e660eb0edb2033f0f8dbb4458f20280082c Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Tue, 6 Nov 2012 12:48:41 -0800 Subject: improved address standardization, #13763 --- httemplate/misc/confirm-address_standardize.html | 123 +++++++++++++++++++++++ 1 file changed, 123 insertions(+) create mode 100644 httemplate/misc/confirm-address_standardize.html (limited to 'httemplate/misc/confirm-address_standardize.html') diff --git a/httemplate/misc/confirm-address_standardize.html b/httemplate/misc/confirm-address_standardize.html new file mode 100644 index 000000000..3603b95d9 --- /dev/null +++ b/httemplate/misc/confirm-address_standardize.html @@ -0,0 +1,123 @@ + +

+% if ( $new{error} or $new{ship_error} ) { +Address standardization error +% } +% else { +Confirm address standardization +% } + +

+ +% for my $pre ('', 'ship_') { +% next if !$pre and $old{onlyship}; +% my $name = $pre eq 'ship_' ? 'service' : 'billing'; +% if ( $new{$pre.'addr_clean'} ) { + + + + + +% if ( $old{$pre.'company'} ) { + + + + +% } + + + + + + + + + + + + + +% } # if addr_clean +% elsif ( $new{$pre.'error'} ) { + + + +% if ( $old{$pre.'company'} ) { + + + +% } + + + + + + + + + + +% } #if error +% } # for $pre + +%# only do this part if address standardization provided a censustract +% if ( $new{'ship_censustract'} ) { + + + + + + + + +% } #if censustract + +% if ( $new{error} or $new{ship_error} ) { + + + + +% } +% else { + + + + + +
Entered <%$name%> addressStandardized <%$name%> address
<% $old{$pre.'company'} %><% $new{$pre.'company'} %>
<% $old{$pre.'address1'} %><% $new{$pre.'address1'} %>
<% $old{$pre.'address2'} %><% $new{$pre.'address2'} %>
<% $old{$pre.'city'} %>, <% $old{$pre.'state'} %> <% $old{$pre.'zip'} %><% $new{$pre.'city'} %>, <% $new{$pre.'state'} %> <% $new{$pre.'zip'} %>
Entered <%$name%> address
<% $old{$pre.'company'} %>
<% $old{$pre.'address1'} %><% $new{$pre.'error'} %>
<% $old{$pre.'address2'} %>
<% $old{$pre.'city'} %>, <% $old{$pre.'state'} %> <% $old{$pre.'zip'} %>
Entered census tractCalculated census tract
<% $old{'ship_censustract'} %> +% if ( $new{'ship_census_error'} ) { + <% $new{'ship_census_error'} %> +% } else { + <% $new{'ship_censustract'} %> +% } +
+ +
+ +
+ +
+% } # !error +<%init> + +# slightly weird interface... +my $q = decode_json($cgi->param('q')); +#warn Dumper($q); +my %old = %{ $q->{old} }; +my %new = %{ $q->{new} }; + +my $addresses = $old{onlyship} ? 'address' : 'addresses'; + + -- cgit v1.2.1