diff options
author | ivan <ivan> | 2009-10-22 08:58:58 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-10-22 08:58:58 +0000 |
commit | d65e20e6e63f007e3197974e56cf88fa84fee77f (patch) | |
tree | 01143ec24bfa8a9306f61b49f9959867ffc42081 /httemplate/elements/select-county.html | |
parent | 27a3aa6e76b70b75d218bbcba997ced8bdbd64e3 (diff) |
fix all location selects hidden on new customer add, fallout from city tax stuff, yay for this not being on _1_9_BRANCH, RT#5852
Diffstat (limited to 'httemplate/elements/select-county.html')
-rw-r--r-- | httemplate/elements/select-county.html | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/httemplate/elements/select-county.html b/httemplate/elements/select-county.html index aa9f453fd..6d498be0a 100644 --- a/httemplate/elements/select-county.html +++ b/httemplate/elements/select-county.html @@ -136,7 +136,7 @@ my $onchange = ( $opt{'disable_cityupdate'} ? '' : $pre.'county_changed(this); ' ). $opt{'onchange'}; -$opt{'style'} ||= []; +my $county_style = $opt{'style'} ? [ @{ $opt{'style'} } ] : []; my @counties = (); if ( $countyflag ) { @@ -144,14 +144,14 @@ if ( $countyflag ) { @counties = map { length($_) ? $_ : $opt{'empty_data_value'} } counties( $opt{'state'}, $opt{'country'} ); - push @{ $opt{'style'} }, 'display:none' + push @$county_style, 'display:none' unless scalar(@counties) > 1; } my $style = - scalar(@{$opt{style}}) - ? 'STYLE="'. join(';', @{$opt{style}}). '"' + scalar(@$county_style) + ? 'STYLE="'. join(';', @$county_style). '"' : ''; </%init> |