|
Lines 23-28
use Modern::Perl;
Link Here
|
| 23 |
use CGI; |
23 |
use CGI; |
| 24 |
use List::MoreUtils qw( uniq ); |
24 |
use List::MoreUtils qw( uniq ); |
| 25 |
use JSON qw( encode_json ); |
25 |
use JSON qw( encode_json ); |
|
|
26 |
use Try::Tiny; |
| 26 |
|
27 |
|
| 27 |
use C4::Auth qw( get_template_and_user ); |
28 |
use C4::Auth qw( get_template_and_user ); |
| 28 |
use C4::Output qw( output_html_with_http_headers ); |
29 |
use C4::Output qw( output_html_with_http_headers ); |
|
Lines 150-166
if ( $op eq 'form' ) {
Link Here
|
| 150 |
# We want to modify selected records! |
151 |
# We want to modify selected records! |
| 151 |
my @record_ids = $input->multi_param('record_id'); |
152 |
my @record_ids = $input->multi_param('record_id'); |
| 152 |
|
153 |
|
| 153 |
my $job_id = Koha::BackgroundJob::BatchUpdateBiblio->new->enqueue( |
154 |
try { |
| 154 |
{ |
155 |
my $job_id = Koha::BackgroundJob::BatchUpdateBiblio->new->enqueue( |
| 155 |
mmtid => $mmtid, |
156 |
{ |
| 156 |
record_type => $recordtype, |
157 |
mmtid => $mmtid, |
| 157 |
record_ids => \@record_ids, |
158 |
record_type => $recordtype, |
| 158 |
} |
159 |
record_ids => \@record_ids, |
| 159 |
); |
160 |
} |
| 160 |
$template->param( |
161 |
); |
| 161 |
view => 'enqueued', |
162 |
$template->param( |
| 162 |
job_id => $job_id, |
163 |
view => 'enqueued', |
| 163 |
); |
164 |
job_id => $job_id, |
|
|
165 |
); |
| 166 |
} catch { |
| 167 |
push @messages, { |
| 168 |
type => 'error', |
| 169 |
code => 'cannot_enqueue_job', |
| 170 |
error => $_, |
| 171 |
}; |
| 172 |
$template->param( view => 'errors' ); |
| 173 |
}; |
| 164 |
} |
174 |
} |
| 165 |
|
175 |
|
| 166 |
$template->param( |
176 |
$template->param( |
| 167 |
- |
|
|