have the UI use full country names, and state names outside the US...
[freeside.git] / httemplate / edit / cust_main / select-state.html
1 <%
2
3   my %opt = @_;
4   foreach my $opt (qw( county state country prefix onchange disabled )) {
5     $opt{$_} = '' unless exists($opt{$_}) && defined($opt{$_});
6   }
7
8 %>
9
10 <SELECT NAME="<%= $opt{'prefix'} %>state" onChange="<%= $opt{'prefix'} %>state_changed(this); <%= $opt{'onchange'} %>" <%= $opt{'disabled'} %>>
11
12 <% tie my %states, 'Tie::IxHash', states_hash( $opt{'country'} ); %>
13 <% foreach my $state ( keys %states ) { %>
14
15   <OPTION VALUE="<%= $state %>"<%= $state eq $opt{'state'} ? ' SELECTED' : '' %>><%= $states{$state} || '(n/a)' %>
16
17 <% } %>
18
19 </SELECT>
20