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
15 % if ( $old{onlyship} ) {
16 % @prefixes = ('ship_');
17 % } elsif ( $old{same} ) {
18 % @prefixes = ('bill_');
20 % @prefixes = ('bill_', 'ship_');
22 % for my $pre (@prefixes) {
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 % my $pre = $old{same} ? 'bill_' : 'ship_';
74 % my $censustract = $new{$pre.'censustract'};
75 % my $census_error = $new{$pre.'census_error'};
76 % if ( $censustract ) {
78 <TH>Entered census tract</TH>
79 <TH>Calculated census tract</TH>
82 <TD><% $old{$pre.'censustract'} %></TD>
84 % if ( $census_error ) {
85 <FONT COLOR="#ff0000"><% $census_error %></FONT>
93 % if ( $new{bill_error} or $new{ship_error} ) {
96 <BUTTON TYPE="button" STYLE="width:205px" onclick="confirm_manual_address();">
97 <IMG SRC="<%$p%>images/error.png" ALT=""> Use entered <%$addresses%>
100 <BUTTON TYPE="button" STYLE="width:205px" onclick="submit_abort();">
101 <IMG SRC="<%$p%>images/cross.png" ALT=""> Cancel submission
108 <BUTTON TYPE="button" STYLE="width:205px" onclick="confirm_manual_address()();">
109 <IMG SRC="<%$p%>images/error.png" ALT=""> Use entered <%$addresses%>
112 <BUTTON TYPE="button" STYLE="width:205px" onclick="replace_address();">
113 <IMG SRC="<%$p%>images/tick.png" ALT=""> Use standardized <%$addresses%>
116 <TR ALIGN="center"><TD COLSPAN=2>
117 <BUTTON TYPE="button" STYLE="width:205px" onclick="submit_abort();">
118 <IMG SRC="<%$p%>images/cross.png" ALT=""> Cancel submission
125 # slightly weird interface...
126 my $q = decode_json($cgi->param('q'));
128 my %old = %{ $q->{old} };
129 my %new = %{ $q->{new} };
131 my $addresses = $old{onlyship} ? 'address' : 'addresses';