ticket 1443 add account type and bank state for echeck processing
[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 % if ($opt{empty}) {
4   <OPTION VALUE=""<% $opt{state} eq '' ? ' SELECTED' : '' %>><% $opt{empty} %>
5 % }
6
7 % foreach my $state ( keys %states ) { 
8
9   <OPTION VALUE="<% $state %>"<% $state eq $opt{'state'} ? ' SELECTED' : '' %>><% $states{$state} || '(n/a)' %>
10
11 % } 
12
13
14 </SELECT>
15
16 <%init>
17 my %opt = @_;
18 foreach my $opt (qw( county state country prefix onchange disabled empty )) {
19   $opt{$_} = '' unless exists($opt{$_}) && defined($opt{$_});
20 }
21
22 tie my %states, 'Tie::IxHash', states_hash( $opt{'country'} ); 
23 </%init>
24