This commit was generated by cvs2svn to compensate for changes in r4407,
[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 <% foreach my $state (
13      sort
14      map { $_->state }
15      qsearch( 'cust_main_county',
16               { 'country' => $opt{'country'} },
17               'DISTINCT ON ( state ) *',
18             )
19    ) {
20 %>
21
22   <OPTION VALUE="<%= $state %>"<%= $state eq $opt{'state'} ? ' SELECTED' : '' %>><%= $state || '(n/a)' %>
23
24 <% } %>
25
26 </SELECT>
27