stray closing /TABLE in the no-ticket case
[freeside.git] / httemplate / misc / counties.cgi
index c9eb985..c022a27 100644 (file)
@@ -1,18 +1,7 @@
-%
-%
-%  my( $state, $country ) = $cgi->param('arg');
-%
-%  my @counties = 
-%     sort
-%     map { s/[\n\r]//g; $_; }
-%     map { $_->county; }
-%     qsearch( 'cust_main_county',
-%              { 'state'   => $state,
-%                'country' => $country,
-%              },
-%            )
-%  ;
-%
-%
-%
 [ <% join(', ', map { qq("$_") } @counties) %> ]
+<%init>
+
+my( $state, $country ) = $cgi->param('arg');
+my @counties = counties($state, $country);
+
+</%init>