X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Fcity.html;h=61d057889e016cad5c2f1492c5e6d9745f0589a2;hp=47e5c37c2e30737156207571d148100a740a8d01;hb=03ceab71dad1e5eb366865d304e5e459cc905ce4;hpb=5950a980cef4968ac59ca8041d2204e6d98e7a3d diff --git a/httemplate/elements/city.html b/httemplate/elements/city.html index 47e5c37c2..61d057889 100644 --- a/httemplate/elements/city.html +++ b/httemplate/elements/city.html @@ -34,7 +34,7 @@ Example: what.options[length] = optionName; } - var saved_<%$pre%>city= ''; + var saved_<%$pre%>city= '<% $saved_city |h %>'; function <% $pre %>county_changed(what, callback) { @@ -124,10 +124,12 @@ my $text_style = $opt{'style'} ? [ @{ $opt{'style'} } ] : []; my $select_style = $opt{'style'} ? [ @{ $opt{'style'} } ] : []; my @cities = cities( $opt{'county'}, $opt{'state'}, $opt{'country'} ); +my $saved_city = ''; if ( scalar(@cities) > 1 || $cities[0] ) { push @$text_style, 'display:none'; } else { push @$select_style, 'display:none'; + $saved_city = $opt{'city'}; } $text_style =