1 <STYLE type="text/css">
2 th { line-height: 150% }
5 % if ( $new{error} or $new{ship_error} ) {
6 Address standardization error
9 Confirm address standardization
14 % for my $pre ('', 'ship_') {
15 % next if !$pre and $old{onlyship};
16 % my $name = $pre eq 'ship_' ? 'service' : 'billing';
17 % if ( $new{$pre.'addr_clean'} ) {
19 <TH>Entered <%$name%> address</TH>
20 <TH>Standardized <%$name%> address</TH>
23 % if ( $old{$pre.'company'} ) {
25 <TD><% $old{$pre.'company'} %></TD>
26 <TD><% $new{$pre.'company'} %></TD>
30 <TD><% $old{$pre.'address1'} %></TD>
31 <TD><% $new{$pre.'address1'} %></TD>
34 <TD><% $old{$pre.'address2'} %></TD>
35 <TD><% $new{$pre.'address2'} %></TD>
38 <TD><% $old{$pre.'city'} %>, <% $old{$pre.'state'} %> <% $old{$pre.'zip'} %></TD>
39 <TD><% $new{$pre.'city'} %>, <% $new{$pre.'state'} %> <% $new{$pre.'zip'} %></TD>
43 % elsif ( $new{$pre.'error'} ) {
45 <TH>Entered <%$name%> address</TH>
47 % if ( $old{$pre.'company'} ) {
49 <TD><% $old{$pre.'company'} %></TD>
53 <TD><% $old{$pre.'address1'} %></TD>
54 <TD ROWSPAN=3><FONT COLOR="#ff0000"><B><% $new{$pre.'error'} %></B></FONT></TD>
57 <TD><% $old{$pre.'address2'} %></TD>
60 <TD><% $old{$pre.'city'} %>, <% $old{$pre.'state'} %> <% $old{$pre.'zip'} %></TD>
65 %# only do this part if address standardization provided a censustract
66 % if ( $new{'ship_censustract'} ) {
68 <TH>Entered census tract</TH>
69 <TH>Calculated census tract</TH>
72 <TD><% $old{'ship_censustract'} %></TD>
74 % if ( $new{'ship_census_error'} ) {
75 <FONT COLOR="#ff0000"><% $new{'ship_census_error'} %></FONT>
77 <% $new{'ship_censustract'} %>
83 % if ( $new{error} or $new{ship_error} ) {
86 <BUTTON TYPE="button" STYLE="width:205px" onclick="confirm_manual_address();">
87 <IMG SRC="<%$p%>images/error.png" ALT=""> Use entered <%$addresses%>
90 <BUTTON TYPE="button" STYLE="width:205px" onclick="submit_abort();">
91 <IMG SRC="<%$p%>images/cross.png" ALT=""> Cancel submission
98 <BUTTON TYPE="button" STYLE="width:205px" onclick="confirm_manual_address()();">
99 <IMG SRC="<%$p%>images/error.png" ALT=""> Use entered <%$addresses%>
102 <BUTTON TYPE="button" STYLE="width:205px" onclick="replace_address();">
103 <IMG SRC="<%$p%>images/tick.png" ALT=""> Use standardized <%$addresses%>
106 <TR ALIGN="center"><TD COLSPAN=2>
107 <BUTTON TYPE="button" STYLE="width:205px" onclick="submit_abort();">
108 <IMG SRC="<%$p%>images/cross.png" ALT=""> Cancel submission
115 # slightly weird interface...
116 my $q = decode_json($cgi->param('q'));
118 my %old = %{ $q->{old} };
119 my %new = %{ $q->{new} };
121 my $addresses = $old{onlyship} ? 'address' : 'addresses';