customer classification, RT#6376
[freeside.git] / httemplate / elements / location.html
index 1bdbf96..5478e1e 100644 (file)
@@ -49,16 +49,7 @@ Example:
 
 <TR>
   <TH ALIGN="right"><%$r%>City</TH>
-  <TD WIDTH="1">
-    <INPUT TYPE     = "text"
-           NAME     = "<%$pre%>city"
-           ID       = "<%$pre%>city"
-           VALUE    = "<% $object->get($pre.'city') |h %>"
-           onChange = "<% $onchange %>"
-           <% $disabled %>
-           <% $style %>
-    >
-  </TD>
+  <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>
@@ -87,7 +78,15 @@ Example:
 % if ( !$pre ) { 
   <INPUT TYPE="hidden" NAME="geocode" VALUE="<% $opt{geocode} %>">
 % } else {
-  <INPUT TYPE="hidden" NAME="censustract" VALUE="<% $opt{censustract} %>">
+%   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>
@@ -115,7 +114,7 @@ $object->set($pre.'state', $statedefault )
          || $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'
@@ -144,6 +143,7 @@ my $county_style =
     : '';
 
 my %select_hash = (
+  'city'     => $object->get($pre.'city'),
   'county'   => $object->get($pre.'county'),
   'state'    => $object->get($pre.'state'),
   'country'  => $object->get($pre.'country'),