From 929f432c766bbe3bdeed5b80818a12ddf6ec6339 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 3 Apr 2006 09:46:57 +0000 Subject: have the UI use full country names, and state names outside the US... --- httemplate/edit/cust_main/select-state.html | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'httemplate/edit/cust_main/select-state.html') diff --git a/httemplate/edit/cust_main/select-state.html b/httemplate/edit/cust_main/select-state.html index 98e685ab8..64da36ba7 100644 --- a/httemplate/edit/cust_main/select-state.html +++ b/httemplate/edit/cust_main/select-state.html @@ -9,17 +9,10 @@ > +% tie my %states, 'Tie::IxHash', states_hash( $opt{'country'} ); +% foreach my $state ( keys %states ) { - -- cgit v1.2.1 From 7517eaa583bcb213b62dfd0c11288aa50a350e8a Mon Sep 17 00:00:00 2001 From: ivan Date: Fri, 25 Aug 2006 19:30:52 +0000 Subject: use GROUP BY instead of DISTINCT ON in the state and country queries for better cross-database compatibility, based on a preliminary patch from Jason Thomas --- httemplate/edit/cust_main/select-state.html | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'httemplate/edit/cust_main/select-state.html') diff --git a/httemplate/edit/cust_main/select-state.html b/httemplate/edit/cust_main/select-state.html index a7e56e78f..87546e5e3 100644 --- a/httemplate/edit/cust_main/select-state.html +++ b/httemplate/edit/cust_main/select-state.html @@ -1,21 +1,20 @@ -% -% -% my %opt = @_; -% foreach my $opt (qw( county state country prefix onchange disabled )) { -% $opt{$_} = '' unless exists($opt{$_}) && defined($opt{$_}); -% } -% -% - - +<%init> +my %opt = @_; +foreach my $opt (qw( county state country prefix onchange disabled )) { + $opt{$_} = '' unless exists($opt{$_}) && defined($opt{$_}); +} + +tie my %states, 'Tie::IxHash', states_hash( $opt{'country'} ); + + -- cgit v1.2.1