diff options
| author | ivan <ivan> | 2006-04-03 09:46:57 +0000 |
|---|---|---|
| committer | ivan <ivan> | 2006-04-03 09:46:57 +0000 |
| commit | 929f432c766bbe3bdeed5b80818a12ddf6ec6339 (patch) | |
| tree | 8129b16aa927db1e4182fcaaeea0c5ee9f050fd4 /httemplate/edit/cust_main/select-state.html | |
| parent | 36693c42cbaca86f6957d5ed6794624810018bb3 (diff) | |
have the UI use full country names, and state names outside the US...
Diffstat (limited to 'httemplate/edit/cust_main/select-state.html')
| -rw-r--r-- | httemplate/edit/cust_main/select-state.html | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/httemplate/edit/cust_main/select-state.html b/httemplate/edit/cust_main/select-state.html index 98e685ab8..64da36ba7 100644 --- a/httemplate/edit/cust_main/select-state.html +++ b/httemplate/edit/cust_main/select-state.html @@ -9,17 +9,10 @@ <SELECT NAME="<%= $opt{'prefix'} %>state" onChange="<%= $opt{'prefix'} %>state_changed(this); <%= $opt{'onchange'} %>" <%= $opt{'disabled'} %>> -<% foreach my $state ( - sort - map { $_->state } - qsearch( 'cust_main_county', - { 'country' => $opt{'country'} }, - 'DISTINCT ON ( state ) *', - ) - ) { -%> +<% tie my %states, 'Tie::IxHash', states_hash( $opt{'country'} ); %> +<% foreach my $state ( keys %states ) { %> - <OPTION VALUE="<%= $state %>"<%= $state eq $opt{'state'} ? ' SELECTED' : '' %>><%= $state || '(n/a)' %> + <OPTION VALUE="<%= $state %>"<%= $state eq $opt{'state'} ? ' SELECTED' : '' %>><%= $states{$state} || '(n/a)' %> <% } %> |
