Lines 1210-1222
Link Here
|
1210 |
|
1210 |
|
1211 |
// Handle checkout for fast cataloging |
1211 |
// Handle checkout for fast cataloging |
1212 |
// Check the referrer to prevent csrf, fill and submit form |
1212 |
// Check the referrer to prevent csrf, fill and submit form |
1213 |
if(document.referrer.split(window.location.origin + '/cgi-bin/koha/cataloguing/additem.pl?')[1].match(/frameworkcode=FA&circborrowernumber=/) ) { |
1213 |
if ( document.referrer.length ) { |
1214 |
let urlParams = new URLSearchParams(window.location.search); |
1214 |
if(document.referrer.split(window.location.origin + '/cgi-bin/koha/cataloguing/additem.pl?')[1].match(/frameworkcode=FA&circborrowernumber=/) ) { |
1215 |
let barcode = urlParams.get('barcode'); |
1215 |
let urlParams = new URLSearchParams(window.location.search); |
1216 |
$('#barcode').val(barcode); |
1216 |
let barcode = urlParams.get('barcode'); |
1217 |
$('#mainform').submit(); |
1217 |
$('#barcode').val(barcode); |
|
|
1218 |
$('#mainform').submit(); |
1219 |
} |
1218 |
} |
1220 |
} |
1219 |
|
|
|
1220 |
$("#cancellation-reason").comboBox({ |
1221 |
$("#cancellation-reason").comboBox({ |
1221 |
displayProperty: 'name', |
1222 |
displayProperty: 'name', |
1222 |
placeholder: _("Select or type a reason"), |
1223 |
placeholder: _("Select or type a reason"), |
1223 |
- |
|
|