From 28fe361296a265139afdeb34ec88519f5cd4c7d2 Mon Sep 17 00:00:00 2001 From: Chris Cormack Date: Thu, 27 Dec 2007 13:52:03 -0600 Subject: [PATCH] Fix for bug 1666 Signed-off-by: Joshua Ferraro --- C4/Members.pm | 13 ++++++++++--- .../prog/en/modules/members/memberentrygen.tmpl | 2 ++ members/memberentry.pl | 4 ++++ 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/C4/Members.pm b/C4/Members.pm index 9c60562ab2..2843d51698 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -1505,7 +1505,8 @@ sub GetCities { #test to know if the table contain some records if no the function return nothing my $id = @id; $sth->finish; - if ( $id eq 0 ) { + if ( $id == 1 ) { + # all we have is the one blank row return (); } else { @@ -1689,8 +1690,14 @@ Looks up the different title . Returns array with all borrowers title sub GetTitles { my @borrowerTitle = split /,|\|/,C4::Context->preference('BorrowersTitles'); unshift( @borrowerTitle, "" ); - return ( \@borrowerTitle); - } + my $count=@borrowerTitle; + if ($count == 1){ + return (); + } + else { + return ( \@borrowerTitle); + } +} diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl index 758e85d7bd..2d5630c201 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/memberentrygen.tmpl @@ -130,6 +130,7 @@ patron Organisation Patron identity
    +
  1. +
  2. diff --git a/members/memberentry.pl b/members/memberentry.pl index a9a593c5c0..c2ac533170 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -322,6 +322,9 @@ if ($select_city eq '' ){ } my($cityid); ($cityid,$name_city)=GetCities(); +if ($cityid) { + warn "hey hey waht the?"; + } $template->param( city_cgipopup => 1) if ($cityid ); my $citypopup = CGI::popup_menu(-name=>'select_city', -id => 'select_city', @@ -345,6 +348,7 @@ my $roadpopup = CGI::popup_menu(-name=>'streettype', my $default_borrowertitle; $default_borrowertitle=$data{'title'} ; my($borrowertitle)=GetTitles(); +$template->param( title_cgipopup => 1) if ($borrowertitle); my $borrotitlepopup = CGI::popup_menu(-name=>'title', -id => 'btitle', -values=>$borrowertitle, -- 2.39.5