#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 {
sub GetTitles {
my @borrowerTitle = split /,|\|/,C4::Context->preference('BorrowersTitles');
unshift( @borrowerTitle, "" );
- return ( \@borrowerTitle);
- }
+ my $count=@borrowerTitle;
+ if ($count == 1){
+ return ();
+ }
+ else {
+ return ( \@borrowerTitle);
+ }
+}
<legend><!--TMPL_IF Name="I"-->Organisation <!--TMPL_ELSE-->Patron <!--/TMPL_IF-->identity</legend>
<ol>
<!-- TMPL_UNLESS name="I" -->
+ <!-- TMPL_IF NAME="title_cgipopup" -->
<li>
<!-- TMPL_IF NAME="mandatorytitle" -->
<label for="btitle" class="required">
<!-- TMPL_VAR NAME="borrotitlepopup" -->
<!-- TMPL_IF NAME="mandatorytitle" --><span class="required">Required</span><!-- /TMPL_IF -->
</li>
+ <!-- /TMPL_IF -->
<!-- /TMPL_UNLESS -->
<li>
<!-- TMPL_IF NAME="mandatorysurname" -->
}
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',
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,