From c40f5c44646f53c43e2fed784d19c3cecdd7f8c7 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Fri, 30 Oct 2015 16:07:37 -0700 Subject: [PATCH] address standardization, part 2 --- httemplate/edit/cust_main.cgi | 12 +++-- httemplate/edit/cust_main/bottomfixup.js | 3 +- httemplate/elements/location.html | 82 ++++++++++++++++++++------------ 3 files changed, 61 insertions(+), 36 deletions(-) diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 25932019e..ee8d1b18d 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -107,12 +107,14 @@ function samechanged(what) { } } -% if ( ! $has_ship_address ) { - $('#ship_location').hide(); -% } - $().ready( function() { - window.bill_location = new Location($('fieldset#bill_location')); + window.bill_location = new Location($('fieldset#bill_location'), 'bill_'); + window.ship_location = new Location($('fieldset#ship_location'), 'ship_'); + + if ($('#same').prop('checked')) { + $('#ship_location').hide(); + } + }); diff --git a/httemplate/edit/cust_main/bottomfixup.js b/httemplate/edit/cust_main/bottomfixup.js index 97816aad7..48da4e32f 100644 --- a/httemplate/edit/cust_main/bottomfixup.js +++ b/httemplate/edit/cust_main/bottomfixup.js @@ -5,7 +5,8 @@ my $conf = new FS::Conf; my $company_latitude = $conf->config('company_latitude'); my $company_longitude = $conf->config('company_longitude'); -my @fixups = ('standardize_locations'); +my @fixups = (); +# 'standardize_locations'); push @fixups, 'confirm_censustract_bill', 'confirm_censustract_ship' if $conf->exists('cust_main-require_censustract'); diff --git a/httemplate/elements/location.html b/httemplate/elements/location.html index d4c0f14d4..705554567 100644 --- a/httemplate/elements/location.html +++ b/httemplate/elements/location.html @@ -271,9 +271,10 @@ Example: % } %# Placeholders <& hidden.html, field => $pre.'cachenum', value => '' &> -<& hidden.html, field => $pre.'addr_clean', value => '' &> +<& hidden.html, field => $pre.'addr_clean', value => $object->get('addr_clean') &> <%init> -- 2.11.0