X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fcity.html;h=61d057889e016cad5c2f1492c5e6d9745f0589a2;hb=63a268637b2d51a8766412617724b9436439deb6;hp=1659ebf473e5f8a956dfa7cd829bd90b0666c060;hpb=0b94e40c533288be69a4fe60da36a385d31eff7f;p=freeside.git diff --git a/httemplate/elements/city.html b/httemplate/elements/city.html index 1659ebf47..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) { @@ -61,6 +61,7 @@ Example: if ( citiesArray.length > 1 || citiesArray[0].length ) { // turn off the text city, turn on the select saved_<%$pre%>city = what.form.<%$ pre %>city.value; + <%$pre%>city_select_changed(what.form.<% $pre %>city_select); what.form.<% $pre %>city.style.display = 'none'; what.form.<% $pre %>city_select.style.display = ''; } else { @@ -123,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 =