projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
i18n: fix our menu when included from RT
[freeside.git]
/
httemplate
/
elements
/
city.html
diff --git
a/httemplate/elements/city.html
b/httemplate/elements/city.html
index
47e5c37
..
956d353
100644
(file)
--- a/
httemplate/elements/city.html
+++ b/
httemplate/elements/city.html
@@
-34,7
+34,7
@@
Example:
what.options[length] = optionName;
}
what.options[length] = optionName;
}
- var saved_<%$pre%>city= '';
+ var saved_<%$pre%>city= '
<% $saved_city |h %>
';
function <% $pre %>county_changed(what, callback) {
function <% $pre %>county_changed(what, callback) {
@@
-64,7
+64,7
@@
Example:
<%$pre%>city_select_changed(what.form.<% $pre %>city_select);
what.form.<% $pre %>city.style.display = 'none';
what.form.<% $pre %>city_select.style.display = '';
<%$pre%>city_select_changed(what.form.<% $pre %>city_select);
what.form.<% $pre %>city.style.display = 'none';
what.form.<% $pre %>city_select.style.display = '';
- } else {
+ } else
if ( what.form.<% $pre %>city.style.display == 'none' )
{
// turn on the text city, turn off the select
what.form.<%$ pre %>city.value = saved_<%$pre%>city;
what.form.<% $pre %>city.style.display = '';
// turn on the text city, turn off the select
what.form.<%$ pre %>city.value = saved_<%$pre%>city;
what.form.<% $pre %>city.style.display = '';
@@
-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 $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';
if ( scalar(@cities) > 1 || $cities[0] ) {
push @$text_style, 'display:none';
} else {
push @$select_style, 'display:none';
+ $saved_city = $opt{'city'};
}
$text_style =
}
$text_style =