summaryrefslogtreecommitdiff
path: root/httemplate/elements/location.html
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/elements/location.html')
-rw-r--r--httemplate/elements/location.html50
1 files changed, 30 insertions, 20 deletions
diff --git a/httemplate/elements/location.html b/httemplate/elements/location.html
index d7b73a2..07aaa69 100644
--- a/httemplate/elements/location.html
+++ b/httemplate/elements/location.html
@@ -3,26 +3,28 @@
Example:
include( '/elements/location.html',
- 'object' => $cust_main, # or $cust_location
- 'prefix' => $pre, #only for cust_main objects
- 'onchange' => $javascript,
- 'disabled' => $disabled,
- 'same_checked' => $same_checked,
- 'geocode' => $geocode, #passed through
- 'no_asterisks' => 0, #set true to disable the red asterisks next
- #to required fields
+ 'object' => $cust_main, # or $cust_location
+ 'prefix' => $pre, #only for cust_main objects
+ 'onchange' => $javascript,
+ '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%>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 %>
@@ -37,7 +39,7 @@ Example:
NAME = "<%$pre%>address2"
ID = "<%$pre%>address2"
VALUE = "<% $object->get($pre.'address2') |h %>"
- SIZE = 58
+ SIZE = 54
onChange = "<% $onchange %>"
<% $disabled %>
<% $style %>
@@ -47,7 +49,7 @@ Example:
<TR>
<TH ALIGN="right"><%$r%>City</TH>
- <TD>
+ <TD WIDTH="1">
<INPUT TYPE = "text"
NAME = "<%$pre%>city"
ID = "<%$pre%>city"
@@ -56,13 +58,11 @@ Example:
<% $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" 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>
@@ -81,11 +81,21 @@ Example:
<TR>
<TH ALIGN="right"><%$r%>Country</TH>
- <TD COLSPAN=5><% include('/elements/select-country.html', %select_hash ) %></TD>
+ <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>
@@ -125,7 +135,7 @@ my @counties = counties( $object->get($pre.'state'),
$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 =