X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main%2Fcontact.html;h=3bed54b859b6bd47147c25252ad824b5c37e1f26;hb=f3717767d19f9da888e190f87a04dfa245d658b4;hp=d93d41728d4c729084170cf6aaadf8953b01e362;hpb=d8cb6cd67cc574c90dbbfbd8db2da6711c516d65;p=freeside.git diff --git a/httemplate/edit/cust_main/contact.html b/httemplate/edit/cust_main/contact.html index d93d41728..3bed54b85 100644 --- a/httemplate/edit/cust_main/contact.html +++ b/httemplate/edit/cust_main/contact.html @@ -25,55 +25,16 @@ - - <%$r%>Address - - > - - - -% my $address2_label_style = -% ( $disabled -% || ! $conf->exists('cust_main-require_address2') -% || ( !$pre && !$opt{'same_checked'} ) -% ) -% ? 'visibility:hidden' -% : ''; - - - * Unit # - - > - - - - - <%$r%>City - - > - - ><%$r%>County - - <% include('/elements/select-county.html', %select_hash ) %> - - <%$r%>State - - <% include('/elements/select-state.html', %select_hash ) %> - - <%$r%>Zip - - > - - - - - <%$r%>Country - <% include('/elements/select-country.html', %select_hash ) %> -% if ( !$pre ) { - -% } - - +<% include('/elements/location.html', + 'prefix' => $pre, + 'object' => $cust_main, + 'onchange' => $onchange, + 'disabled' => $disabled, + 'same_checked' => $opt{'same_checked'}, + 'geocode' => $opt{'geocode'}, + 'censustract' => $opt{'censustract'}, + ) +%> <% $daytime_label %> @@ -150,6 +111,10 @@ $cust_main->set($pre.'state', $statedefault ) $cust_main->set('stateid_state', $cust_main->state ) unless $pre || $cust_main->get('stateid_state'); +if ( $conf->exists('cust_main-require_censustract') ) { + $opt{censustract} ||= $cust_main->censustract; +} + #my($county_html, $state_html, $country_html) = # FS::cust_main_county::regionselector( $cust_main->get($pre.'county'), # $cust_main->get($pre.'state'), @@ -159,20 +124,6 @@ $cust_main->set('stateid_state', $cust_main->state ) # $disabled, # ); -my %select_hash = ( - 'county' => $cust_main->get($pre.'county'), - 'state' => $cust_main->get($pre.'state'), - 'country' => $cust_main->get($pre.'country'), - 'prefix' => $pre, - 'onchange' => $onchange, - 'disabled' => $disabled, -); - -my @counties = counties( $cust_main->get($pre.'state'), - $cust_main->get($pre.'country'), - ); -my $county_style = scalar(@counties) > 1 ? '' : 'STYLE="visibility:hidden"'; - my $daytime_label = FS::Msgcat::_gettext('daytime') =~ /^(daytime)?$/ ? 'Day Phone' : FS::Msgcat::_gettext('daytime');