Merge branch 'master' of ssh://git.freeside.biz/home/git/freeside
[freeside.git] / httemplate / misc / counties.cgi
index 80ae616..c022a27 100644 (file)
@@ -1,17 +1,7 @@
-<%
+[ <% join(', ', map { qq("$_") } @counties) %> ]
+<%init>
 
-  my( $state, $country ) = $cgi->param('arg');
+my( $state, $country ) = $cgi->param('arg');
+my @counties = counties($state, $country);
 
-  my @counties = 
-     sort
-     map { s/[\n\r]//g; $_; }
-     map { $_->county; }
-     qsearch( 'cust_main_county',
-              { 'state'   => $state,
-                'country' => $country,
-              },
-            )
-  ;
-
-
-%>[ <%= join(', ', map { qq("$_") } @counties) %> ]
+</%init>