Will things ever be the same again?
[freeside.git] / httemplate / misc / states.cgi
index cff2c97..cf2b46e 100644 (file)
@@ -1,16 +1,7 @@
-<%
-
-  my $country = $cgi->param('arg');
-
-  my @states = 
-     sort
-     map { s/[\n\r]//g; $_; }
-     map { $_->state; }
-     qsearch( 'cust_main_county',
-              { 'country' => $country },
-              'DISTINCT ON ( state ) *',
-            )
-  ;
-
-
-%>[ <%= join(', ', map { qq("$_") } @states) %> ]
+%
+%
+%  my $country = $cgi->param('arg');
+%  my @output = states_hash($country);
+%
+%
+[ <% join(', ', map { qq("$_") } @output) %> ]