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