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
15 % if ( $old{onlyship} ) {
16 % @prefixes = ('ship_');
17 % } elsif ( $old{same} ) {
20 % @prefixes = ('', 'ship_');
22 % for my $pre ('', 'ship_') {
23 % my $name = $pre eq 'ship_' ? 'service' : 'billing';
24 % if ( $new{$pre.'addr_clean'} ) {
26 <TH>Entered <%$name%> address</TH>
27 <TH>Standardized <%$name%> address</TH>
30 % if ( $old{$pre.'company'} ) {
32 <TD><% $old{$pre.'company'} %></TD>
33 <TD><% $new{$pre.'company'} %></TD>
37 <TD><% $old{$pre.'address1'} %></TD>
38 <TD><% $new{$pre.'address1'} %></TD>
41 <TD><% $old{$pre.'address2'} %></TD>
42 <TD><% $new{$pre.'address2'} %></TD>
45 <TD><% $old{$pre.'city'} %>, <% $old{$pre.'state'} %> <% $old{$pre.'zip'} %></TD>
46 <TD><% $new{$pre.'city'} %>, <% $new{$pre.'state'} %> <% $new{$pre.'zip'} %></TD>
50 % elsif ( $new{$pre.'error'} ) {
52 <TH>Entered <%$name%> address</TH>
54 % if ( $old{$pre.'company'} ) {
56 <TD><% $old{$pre.'company'} %></TD>
60 <TD><% $old{$pre.'address1'} %></TD>
61 <TD ROWSPAN=3><FONT COLOR="#ff0000"><B><% $new{$pre.'error'} %></B></FONT></TD>
64 <TD><% $old{$pre.'address2'} %></TD>
67 <TD><% $old{$pre.'city'} %>, <% $old{$pre.'state'} %> <% $old{$pre.'zip'} %></TD>
72 %# only do this part if address standardization provided a censustract
73 % if ( $new{'ship_censustract'} ) {
75 <TH>Entered census tract</TH>
76 <TH>Calculated census tract</TH>
79 <TD><% $old{'ship_censustract'} %></TD>
81 % if ( $new{'ship_census_error'} ) {
82 <FONT COLOR="#ff0000"><% $new{'ship_census_error'} %></FONT>
84 <% $new{'ship_censustract'} %>
90 % if ( $new{error} or $new{ship_error} ) {
93 <BUTTON TYPE="button" STYLE="width:205px" onclick="confirm_manual_address();">
94 <IMG SRC="<%$p%>images/error.png" ALT=""> Use entered <%$addresses%>
97 <BUTTON TYPE="button" STYLE="width:205px" onclick="submit_abort();">
98 <IMG SRC="<%$p%>images/cross.png" ALT=""> Cancel submission
105 <BUTTON TYPE="button" STYLE="width:205px" onclick="confirm_manual_address()();">
106 <IMG SRC="<%$p%>images/error.png" ALT=""> Use entered <%$addresses%>
109 <BUTTON TYPE="button" STYLE="width:205px" onclick="replace_address();">
110 <IMG SRC="<%$p%>images/tick.png" ALT=""> Use standardized <%$addresses%>
113 <TR ALIGN="center"><TD COLSPAN=2>
114 <BUTTON TYPE="button" STYLE="width:205px" onclick="submit_abort();">
115 <IMG SRC="<%$p%>images/cross.png" ALT=""> Cancel submission
122 # slightly weird interface...
123 my $q = decode_json($cgi->param('q'));
125 my %old = %{ $q->{old} };
126 my %new = %{ $q->{new} };
128 my $addresses = $old{onlyship} ? 'address' : 'addresses';