1 <STYLE type="text/css">
2 th { line-height: 150% }
5 % if ( $new{bill_error} or $new{ship_error} ) {
6 Address standardization error
9 Confirm address standardization
14 % my @prefixes = ('');
16 % @prefixes = ('bill_');
17 % } elsif ( $old{billship} ) {
18 % @prefixes = ('bill_', 'ship_');
20 % for my $pre (@prefixes) {
21 % my $name = $pre eq 'bill_' ? 'billing' : 'service';
22 % if ( $new{$pre.'error'} ) {
24 <TH>Entered <%$name%> address</TH>
26 % if ( $old{$pre.'company'} ) {
28 <TD><% $old{$pre.'company'} %></TD>
32 <TD><% $old{$pre.'address1'} %></TD>
33 <TD ROWSPAN=3><FONT COLOR="#ff0000"><B><% $new{$pre.'error'} %></B></FONT></TD>
36 <TD><% $old{$pre.'address2'} %></TD>
39 <TD><% $old{$pre.'city'} %>, <% $old{$pre.'state'} %> <% $old{$pre.'zip'} %></TD>
41 % } else { # not an error
43 <TH>Entered <%$name%> address</TH>
44 <TH>Standardized <%$name%> address</TH>
46 % if ( !$new{$pre.'addr_clean'} ) {
49 <TH STYLE="font-size:smaller;color:#ff0000">(unverified)</TH>
53 % if ( $old{$pre.'company'} ) {
55 <TD><% $old{$pre.'company'} %></TD>
56 <TD><% $new{$pre.'company'} %></TD>
60 <TD><% $old{$pre.'address1'} %></TD>
61 <TD><% $new{$pre.'address1'} %></TD>
64 <TD><% $old{$pre.'address2'} %></TD>
65 <TD><% $new{$pre.'address2'} %></TD>
68 <TD><% $old{$pre.'city'} %>, <% $old{$pre.'state'} %> <% $old{$pre.'zip'} %></TD>
69 <TD><% $new{$pre.'city'} %>, <% $new{$pre.'state'} %> <% $new{$pre.'zip'} %></TD>
75 %# only do this part if address standardization provided a censustract
76 % my $pre = $old{same} ? 'bill_' : 'ship_';
77 % my $censustract = $new{$pre.'censustract'};
78 % my $census_error = $new{$pre.'census_error'};
79 % if ( $censustract ) {
81 <TH>Entered census tract</TH>
82 <TH>Calculated census tract</TH>
85 <TD><% $old{$pre.'censustract'} %></TD>
87 % if ( $census_error ) {
88 <FONT COLOR="#ff0000"><% $census_error %></FONT>
96 % if ( grep {$new{$_.'error'}} @prefixes ) {
99 <BUTTON TYPE="button" STYLE="width:205px" onclick="confirm_manual_address();">
100 <IMG SRC="<%$p%>images/error.png" ALT=""> Use entered <%$addresses%>
103 <BUTTON TYPE="button" STYLE="width:205px" onclick="submit_abort();">
104 <IMG SRC="<%$p%>images/cross.png" ALT=""> Cancel submission
110 <BUTTON TYPE="button" STYLE="width:205px" onclick="confirm_manual_address();">
111 <IMG SRC="<%$p%>images/error.png" ALT=""> Use entered <%$addresses%>
114 <BUTTON TYPE="button" STYLE="width:205px" onclick="replace_address();">
115 <IMG SRC="<%$p%>images/tick.png" ALT=""> Use standardized <%$addresses%>
118 <TR ALIGN="center"><TD COLSPAN=2>
119 <BUTTON TYPE="button" STYLE="width:205px" onclick="submit_abort();">
120 <IMG SRC="<%$p%>images/cross.png" ALT=""> Cancel submission
127 # slightly weird interface...
128 my $q = decode_json($cgi->param('q'));
130 my %old = %{ $q->{old} };
131 my %new = %{ $q->{new} };
133 my $addresses = $old{billship} ? 'addresses' : 'address';