X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fselect-country.html;h=286826752f279f07b5bdfb5ab921e6dddd4b708f;hb=5b0df166c22e13eba83fabee858846ead6a54141;hp=724afe318ff1ec91399027532885fe842839f03b;hpb=6c284750de8fe49d7d4cdc6a9a4fb618697780e2;p=freeside.git diff --git a/httemplate/elements/select-country.html b/httemplate/elements/select-country.html index 724afe318..286826752 100644 --- a/httemplate/elements/select-country.html +++ b/httemplate/elements/select-country.html @@ -40,6 +40,8 @@ Example: } function <% $pre %>country_changed(what, callback) { + + what.form.<% $pre %>state.disabled = 'disabled'; country = what.options[what.selectedIndex].value; @@ -61,6 +63,8 @@ Example: 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 ) { @@ -87,15 +91,13 @@ Example: > % unless ( $opt{'disable_empty'} ) { - % } % foreach my $country ( @all_countries ) { - - % } @@ -126,7 +128,7 @@ my $default = $conf->config('countrydefault') || 'US'; 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({