|
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 145-166
if ($findborrower) {
Link Here
|
| 145 |
$borrowernumber_hold = $patron->borrowernumber if $patron; |
146 |
$borrowernumber_hold = $patron->borrowernumber if $patron; |
| 146 |
} |
147 |
} |
| 147 |
|
148 |
|
| 148 |
if($findclub) { |
149 |
if ($form_submitted) { |
| 149 |
my $club = Koha::Clubs->find( { name => $findclub } ); |
150 |
if ($findclub) { |
| 150 |
if( $club ) { |
151 |
my $club = Koha::Clubs->find( { name => $findclub } ); |
| 151 |
$club_hold = $club->id; |
152 |
if ($club) { |
| 152 |
} else { |
153 |
$club_hold = $club->id; |
| 153 |
my @clubs = Koha::Clubs->search( [ |
|
|
| 154 |
{ name => { like => '%'.$findclub.'%' } }, |
| 155 |
{ description => { like => '%'.$findclub.'%' } } |
| 156 |
] )->as_list; |
| 157 |
if( scalar @clubs == 1 ) { |
| 158 |
$club_hold = $clubs[0]->id; |
| 159 |
} elsif ( @clubs ) { |
| 160 |
$template->param( clubs => \@clubs ); |
| 161 |
} else { |
154 |
} else { |
| 162 |
$messageclub = "'$findclub'"; |
155 |
my @clubs = Koha::Clubs->search( |
|
|
156 |
[ |
| 157 |
{ name => { like => '%' . $findclub . '%' } }, |
| 158 |
{ description => { like => '%' . $findclub . '%' } } |
| 159 |
] |
| 160 |
)->as_list; |
| 161 |
if ( scalar @clubs == 1 ) { |
| 162 |
$club_hold = $clubs[0]->id; |
| 163 |
} elsif (@clubs) { |
| 164 |
$template->param( clubs => \@clubs ); |
| 165 |
} else { |
| 166 |
$messageclub = "'$findclub'"; |
| 167 |
} |
| 163 |
} |
168 |
} |
|
|
169 |
} else { |
| 170 |
my @clubs = Koha::Clubs->search()->as_list; |
| 171 |
$template->param( clubs => \@clubs ); |
| 164 |
} |
172 |
} |
| 165 |
} |
173 |
} |
| 166 |
|
174 |
|
| 167 |
- |
|
|