| Lines 89-94
          my $messages;
      
      
        Link Here | 
        
          | 89 | my $exceeded_maxreserves; | 89 | my $exceeded_maxreserves; | 
        
          | 90 | my $exceeded_holds_per_record; | 90 | my $exceeded_holds_per_record; | 
        
          | 91 | my @failed_holds = $input->multi_param('failed_holds'); | 91 | my @failed_holds = $input->multi_param('failed_holds'); | 
            
              |  |  | 92 | my $form_submitted = $input->param('form_submitted'); | 
        
          | 92 |  | 93 |  | 
        
          | 93 | my $op = $input->param('op') || q{}; | 94 | my $op = $input->param('op') || q{}; | 
        
          | 94 |  | 95 |  | 
  
    | Lines 150-171
          if ($findborrower) {
      
      
        Link Here | 
        
          | 150 |     $borrowernumber_hold = $patron->borrowernumber if $patron; | 151 |     $borrowernumber_hold = $patron->borrowernumber if $patron; | 
        
          | 151 | } | 152 | } | 
        
          | 152 |  | 153 |  | 
          
            
              | 153 | if($findclub) { | 154 | if ($form_submitted) { | 
            
              | 154 |     my $club = Koha::Clubs->find( { name => $findclub } ); | 155 |     if ($findclub) { | 
            
              | 155 |     if( $club ) { | 156 |         my $club = Koha::Clubs->find( { name => $findclub } ); | 
            
              | 156 |         $club_hold = $club->id; | 157 |         if ($club) { | 
            
              | 157 |     } else { | 158 |             $club_hold = $club->id; | 
            
              | 158 |         my @clubs = Koha::Clubs->search( [ |  |  | 
            
              | 159 |             { name => { like => '%'.$findclub.'%' } }, | 
            
              | 160 |             { description => { like => '%'.$findclub.'%' } } | 
            
              | 161 |         ] )->as_list; | 
            
              | 162 |         if( scalar @clubs == 1 ) { | 
            
              | 163 |             $club_hold = $clubs[0]->id; | 
            
              | 164 |         } elsif ( @clubs ) { | 
            
              | 165 |             $template->param( clubs => \@clubs ); | 
        
          | 166 |         } else { | 159 |         } else { | 
          
            
              | 167 |             $messageclub = "'$findclub'"; | 160 |             my @clubs = Koha::Clubs->search( | 
            
              |  |  | 161 |                 [ | 
            
              | 162 |                     { name        => { like => '%' . $findclub . '%' } }, | 
            
              | 163 |                     { description => { like => '%' . $findclub . '%' } } | 
            
              | 164 |                 ] | 
            
              | 165 |             )->as_list; | 
            
              | 166 |             if ( scalar @clubs == 1 ) { | 
            
              | 167 |                 $club_hold = $clubs[0]->id; | 
            
              | 168 |             } elsif (@clubs) { | 
            
              | 169 |                 $template->param( clubs => \@clubs ); | 
            
              | 170 |             } else { | 
            
              | 171 |                 $messageclub = "'$findclub'"; | 
            
              | 172 |             } | 
        
          | 168 |         } | 173 |         } | 
            
              |  |  | 174 |     } else { | 
            
              | 175 |         my @clubs = Koha::Clubs->search()->as_list; | 
            
              | 176 |         $template->param( clubs => \@clubs ); | 
        
          | 169 |     } | 177 |     } | 
        
          | 170 | } | 178 | } | 
        
          | 171 |  | 179 |  | 
            
              | 172 | -  |  |  |