View | Details | Raw Unified | Return to bug 39307
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt (-7 / +8 lines)
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
                const referrerSplit = document.referrer.split(window.location.origin + '/cgi-bin/koha/cataloguing/additem.pl?')
1215
                let barcode = urlParams.get('barcode');
1215
                if(referrerSplit[1] && referrerSplit[1].match(/frameworkcode=FA&circborrowernumber=/) ) {
1216
                $('#barcode').val(barcode);
1216
                    let urlParams = new URLSearchParams(window.location.search);
1217
                $('#mainform').submit();
1217
                    let barcode = urlParams.get('barcode');
1218
                    $('#barcode').val(barcode);
1219
                    $('#mainform').submit();
1220
                }
1218
            }
1221
            }
1219
1220
            $("#cancellation-reason").comboBox({
1222
            $("#cancellation-reason").comboBox({
1221
                displayProperty: 'name',
1223
                displayProperty: 'name',
1222
                placeholder: _("Select or type a reason"),
1224
                placeholder: _("Select or type a reason"),
1223
- 

Return to bug 39307