invoice_sections_with_taxes per-agent, RT#79636
[freeside.git] / httemplate / elements / select-country.html
index 724afe3..c981479 100644 (file)
@@ -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 ) {
@@ -94,7 +98,7 @@ Example:
 
   <OPTION VALUE="<% $country |h %>"
           <% $country eq $opt{'country'} ? ' SELECTED' : '' %>
-  ><% code2country($country). " ($country)" %>
+  ><% FS::geocode_Mixin->code2country($country). " ($country)" %>
 
 % } 
 
@@ -126,7 +130,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({