X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main%2Fselect-county.html;h=0dc8268969334a06f32b48f3b3c799a7330899b4;hb=a96ddd777a87c2f74a9cf408b44d0f6e7347b5f3;hp=70a8f947783a8b0da99a55f09705d882ec71f39c;hpb=9e342300c380e29af1b9678f1a9604609e0061b6;p=freeside.git
diff --git a/httemplate/edit/cust_main/select-county.html b/httemplate/edit/cust_main/select-county.html
index 70a8f9477..0dc826896 100644
--- a/httemplate/edit/cust_main/select-county.html
+++ b/httemplate/edit/cust_main/select-county.html
@@ -1,21 +1,10 @@
-<%
+% if ( $countyflag ) {
- my %opt = @_;
- foreach my $opt (qw( county state country prefix onchange disabled )) {
- $opt{$_} = '' unless exists($opt{$_}) && defined($opt{$_});
- }
-
- my $sql = "SELECT COUNT(*) FROM cust_main_county".
- " WHERE county IS NOT NULL AND county != ''";
- my $sth = dbh->prepare($sql) or die dbh->errstr;
- $sth->execute or die $sth->errstr;
- my $countyflag = $sth->fetchrow_arrayref->[0];
-
-%>
-
-<% if ( $countyflag ) { %>
-
- <%= include('/elements/xmlhttp.html', $p.'misc/counties.cgi', $opt{'prefix'}. 'get_counties' ) %>
+ <% include('/elements/xmlhttp.html',
+ 'url' => $p.'misc/counties.cgi',
+ 'subs' => [ $opt{'prefix'}. 'get_counties' ],
+ )
+ %>
-