X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fmisc%2Fstates.cgi;h=02b7be4aff21a9a05ebc91e4add1cf9065c518f2;hp=cff2c9774aa512525a216e4c7acb7648643e64c5;hb=d2b55d07a9e6e64a38877136d7974ab93e14f1ed;hpb=9e342300c380e29af1b9678f1a9604609e0061b6 diff --git a/httemplate/misc/states.cgi b/httemplate/misc/states.cgi index cff2c9774..02b7be4af 100644 --- a/httemplate/misc/states.cgi +++ b/httemplate/misc/states.cgi @@ -1,16 +1,7 @@ -<% +[ <% join(', ', map { qq("$_") } @output) %> ] +<%init> - my $country = $cgi->param('arg'); +my $country = $cgi->param('arg'); +my @output = states_hash($country); - my @states = - sort - map { s/[\n\r]//g; $_; } - map { $_->state; } - qsearch( 'cust_main_county', - { 'country' => $country }, - 'DISTINCT ON ( state ) *', - ) - ; - - -%>[ <%= join(', ', map { qq("$_") } @states) %> ] +