X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fstandardize_locations.js;h=1a01daa6f3f06c41122fbe92d8590321f7a8d547;hb=09ae66f29fc7cbd46c13ae1f9361713cbce54153;hp=ff7183b26a22823eabe1d468a89f057cb35085af;hpb=8dd41f364aaba88969dfd0908feb22709025e7f6;p=freeside.git diff --git a/httemplate/elements/standardize_locations.js b/httemplate/elements/standardize_locations.js index ff7183b26..1a01daa6f 100644 --- a/httemplate/elements/standardize_locations.js +++ b/httemplate/elements/standardize_locations.js @@ -13,7 +13,7 @@ function form_address_info() { % } % for my $pre (@prefixes) { % # normal case -% for my $field (qw(address1 address2 city state zip country)) { +% for my $field (qw(address1 address2 state zip country), ($conf->exists('cust_main-no_city_in_address') ? () : 'city')) { returnobj['<% $pre %><% $field %>'] = cf.elements['<% $pre %><% $field %>'].value; % } #for $field % if ( $withcensus ) { @@ -145,7 +145,7 @@ function replace_address() { var clean = newaddr['<% $pre %>addr_clean'] == 'Y'; var error = newaddr['<% $pre %>error']; if ( clean ) { -% foreach my $field (qw(address1 address2 city state zip addr_clean )) { +% foreach my $field (qw(address1 address2 state zip addr_clean ),($conf->exists('cust_main-no_city_in_address') ? () : 'city')) { cf.elements['<% $pre %><% $field %>'].value = newaddr['<% $pre %><% $field %>']; % } #foreach $field