From 20bddf47a41b6d064b3cfa4c41e55c157cf0c3de Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 9 Jan 2009 04:06:26 +0000 Subject: pick/enter a location when ordering a package, RT#4499 --- httemplate/edit/cust_main/contact.html | 72 +++++----------------------------- 1 file changed, 9 insertions(+), 63 deletions(-) (limited to 'httemplate/edit') diff --git a/httemplate/edit/cust_main/contact.html b/httemplate/edit/cust_main/contact.html index d93d41728..27dd38516 100644 --- a/httemplate/edit/cust_main/contact.html +++ b/httemplate/edit/cust_main/contact.html @@ -25,55 +25,15 @@ - - <%$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'}, + ) +%> <% $daytime_label %> @@ -159,20 +119,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'); -- cgit v1.2.1