From cfbcb8867b15c66c279816bce91a69c5ee9b2710 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Fri, 30 Oct 2015 22:38:01 -0700 Subject: allow separate address standardization of billing and service addresses, #38646 --- httemplate/misc/confirm-address_standardize.html | 81 ++++++++++++++---------- 1 file changed, 49 insertions(+), 32 deletions(-) (limited to 'httemplate/misc') diff --git a/httemplate/misc/confirm-address_standardize.html b/httemplate/misc/confirm-address_standardize.html index 2eae011c4..0a05c70bd 100644 --- a/httemplate/misc/confirm-address_standardize.html +++ b/httemplate/misc/confirm-address_standardize.html @@ -1,8 +1,15 @@

-% if ( $new{bill_error} or $new{ship_error} ) { +% if ( $is_error ) { Address standardization error % } % else { @@ -10,24 +17,26 @@ Confirm address standardization % }

+
-% my @prefixes = (''); -% if ( $old{same} ) { -% @prefixes = ('bill_'); -% } elsif ( $old{billship} ) { -% @prefixes = ('bill_', 'ship_'); -% } % for my $pre (@prefixes) { % my $name = $pre eq 'bill_' ? 'billing' : 'service'; +% my $rows = 5; % if ( $new{$pre.'error'} ) { - + + + + -% if ( $old{$pre.'company'} ) { +% if ( $old{$pre.'company'} ) { - % } + @@ -39,9 +48,16 @@ Confirm address standardization % } else { # not an error +% $rows++ if !$new{$pre.'addr_clean'}; + + % if ( !$new{$pre.'addr_clean'} ) { @@ -75,11 +91,16 @@ Confirm address standardization %# only do this part if address standardization provided a censustract % my $pre = $old{same} ? 'bill_' : 'ship_'; % my $censustract = $new{$pre.'censustract'}; -% my $census_error = $new{$pre.'census_error'}; % if ( $censustract ) { + + @@ -93,35 +114,21 @@ Confirm address standardization % } #if censustract -% if ( grep {$new{$_.'error'}} @prefixes ) { + + -% } else { - - - - -
Entered <%$name%> address CLASS="td_radio"> + + Entered <%$name%> address +
<% $old{$pre.'company'} %>
<% $old{$pre.'address1'} %> <% $new{$pre.'error'} %><% $old{$pre.'city'} %>, <% $old{$pre.'state'} %> <% $old{$pre.'zip'} %>
CLASS="td_radio"> + + Entered <%$name%> address Standardized <%$name%> address CLASS="td_radio"> + +
+ > + Entered census tract Calculated census tract + > +
<% $old{$pre.'censustract'} %>
-
- -
- -
-% } # !error +
<%init> # slightly weird interface... @@ -132,4 +139,14 @@ my %new = %{ $q->{new} }; my $addresses = $old{billship} ? 'addresses' : 'address'; +my @prefixes = (''); +if ( $old{same} ) { + @prefixes = ('bill_'); +} elsif ( $old{billship} ) { + @prefixes = ('bill_', 'ship_'); +} + +my $census_error = $new{'census_error'}; +my $is_error = $census_error || grep { $new{$_.'error'} } @prefixes; + -- cgit v1.2.1