projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git]
/
httemplate
/
misc
/
states.cgi
diff --git
a/httemplate/misc/states.cgi
b/httemplate/misc/states.cgi
index
cff2c97
..
02b7be4
100644
(file)
--- 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) %> ]
+</%init>