'disabled' => $disabled,
'same_checked' => $same_checked,
'geocode' => $geocode, #passed through
+ 'censustract' => $censustract, #passed through
'no_asterisks' => 0, #set true to disable the red asterisks next
#to required fields
'address1_label' => 'Address', #label for address
</%doc>
<TR>
- <TH ALIGN="right"><%$r%><% $opt{'address1_label'} || 'Address' %></TH>
+ <<%$th%> ALIGN="right"><%$r%><% $opt{'address1_label'} || 'Address' %></<%$th%>>
<TD COLSPAN=7>
<INPUT TYPE = "text"
NAME = "<%$pre%>address1"
ID = "<%$pre%>address1"
VALUE = "<% $object->get($pre.'address1') |h %>"
- SIZE = 58
+ SIZE = 54
onChange = "<% $onchange %>"
<% $disabled %>
<% $style %>
NAME = "<%$pre%>address2"
ID = "<%$pre%>address2"
VALUE = "<% $object->get($pre.'address2') |h %>"
- SIZE = 58
+ SIZE = 54
onChange = "<% $onchange %>"
<% $disabled %>
<% $style %>
</TR>
<TR>
- <TH ALIGN="right"><%$r%>City</TH>
- <TD>
- <INPUT TYPE = "text"
- NAME = "<%$pre%>city"
- ID = "<%$pre%>city"
- VALUE = "<% $object->get($pre.'city') |h %>"
- onChange = "<% $onchange %>"
- <% $disabled %>
- <% $style %>
- >
- </TD>
- <TH ALIGN="right" ID="<%$pre%>countylabel" <%$county_style%>><%$r%>County</TH>
- <TD>
- <% include('/elements/select-county.html', %select_hash ) %>
- </TD>
- <TH ALIGN="right"><%$r%>State</TH>
- <TD>
+ <<%$th%> ALIGN="right"><%$r%>City</<%$th%>>
+ <TD WIDTH="1"><% include('/elements/city.html', %select_hash) %></TD>
+ <<%$th%> ALIGN="right" ID="<%$pre%>countylabel" <%$county_style%>><%$r%>County</<%$th%>>
+ <TD><% include('/elements/select-county.html', %select_hash ) %></TD>
+ <<%$th%> ALIGN="right" WIDTH="1"><%$r%>State</<%$th%>>
+ <TD WIDTH="1">
<% include('/elements/select-state.html', %select_hash ) %>
</TD>
- <TH><%$r%>Zip</TH>
+ <<%$th%>><%$r%>Zip</<%$th%>>
<TD>
<INPUT TYPE = "text"
NAME = "<%$pre%>zip"
</TR>
<TR>
- <TH ALIGN="right"><%$r%>Country</TH>
- <TD COLSPAN=5><% include('/elements/select-country.html', %select_hash ) %></TD>
+ <<%$th%> ALIGN="right"><%$r%>Country</<%$th%>>
+ <TD COLSPAN=6><% include('/elements/select-country.html', %select_hash ) %></TD>
</TR>
% if ( !$pre ) {
<INPUT TYPE="hidden" NAME="geocode" VALUE="<% $opt{geocode} %>">
+% } else {
+% if ( $pre eq 'ship_' && $conf->exists('cust_main-require_censustract') ) {
+ <TR><<%$th%> ALIGN="right">Census tract<BR>(automatic)</<%$th%>>
+ <TD>
+ <INPUT TYPE="text" NAME="censustract" VALUE="<% $opt{censustract} %>">
+ </TD>
+ </TR>
+% } else {
+ <INPUT TYPE="hidden" NAME="censustract" VALUE="<% $opt{censustract} %>">
+% }
% }
<%init>
|| $object->get($pre.'country') ne $countrydefault;
my @style = ();
-push @style, 'background-color: #dddddd"' if $disabled;
+push @style, 'background-color: #dddddd' if $disabled;
my @address2_label_style = ();
push @address2_label_style, 'visibility:hidden'
$object->get($pre.'country'),
);
my @county_style = ();
-push @county_style, 'visibility:hidden'
+push @county_style, 'display:none' # 'visibility:hidden'
unless scalar(@counties) > 1;
my $style =
: '';
my %select_hash = (
+ 'city' => $object->get($pre.'city'),
'county' => $object->get($pre.'county'),
'state' => $object->get($pre.'state'),
'country' => $object->get($pre.'country'),
'style' => \@style,
);
+my $th = $opt{'no_bold'} ? 'TD' : 'TH';
+
</%init>