X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fselect-county.html;h=6d498be0a6dc5e4e808d79e110384a4bfa777fa7;hb=d65e20e6e63f007e3197974e56cf88fa84fee77f;hp=aa9f453fd6aa4daa5d1fc3e4b3d59cf61f06982c;hpb=27a3aa6e76b70b75d218bbcba997ced8bdbd64e3;p=freeside.git 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). '"' : '';