}
function <% $pre %>country_changed(what, callback) {
+
+ what.form.<% $pre %>state.disabled = 'disabled';
country = what.options[what.selectedIndex].value;
stateLabel = <% $opt{state_empty_label} || '(n/a)' |js_string %>;
opt(what.form.<% $pre %>state, statesArray[s], stateLabel);
}
+
+ what.form.<% $pre %>state.disabled = '';
//run the callback
if ( callback != null ) {
>
% unless ( $opt{'disable_empty'} ) {
- <OPTION VALUE=""><% $opt{'empty_label'} || '(all)' %>
+ <OPTION VALUE=""><% $opt{'empty_label'} || '(all)' %></OPTION>
% }
% foreach my $country ( @all_countries ) {
-
- <OPTION VALUE="<% $country |h %>"
- <% $country eq $opt{'country'} ? ' SELECTED' : '' %>
- ><% code2country($country). " ($country)" %>
-
+ <OPTION VALUE="<% $country |h %>"<% $country eq $opt{'country'} ? ' SELECTED' : '' %>>
+ <% FS::geocode_Mixin->code2country($country). " ($country)" |h %>
+ </OPTION>
% }
</SELECT>
my @all_countries = (
sort { ($b eq $default) <=> ($a eq $default)
- or code2country($a) cmp code2country($b)
+ or FS::geocode_Mixin->code2country($a) cmp FS::geocode_Mixin->code2country($b)
}
map { $_->country }
qsearch({