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

(-)a/koha-tmpl/opac-tmpl/bootstrap/js/barcode-generator.js (-2 / +9 lines)
Lines 22-27 document.addEventListener("DOMContentLoaded", function() { Link Here
22
        const errorMessage = match ? match[1] : error.message;
22
        const errorMessage = match ? match[1] : error.message;
23
23
24
        console.error(error);
24
        console.error(error);
25
        document.getElementById('barcode-container').innerHTML = "<p><strong>" + __("Error:") + " </strong>${errorMessage}</p>";
25
        if (errorMessage){
26
            const para = document.createElement('p');
27
            const strong = document.createElement('strong');
28
            strong.textContent = __("Error: ");
29
            let err_msg = document.createTextNode(errorMessage);
30
            para.appendChild(strong);
31
            para.appendChild(err_msg);
32
            document.getElementById('barcode-container').replaceChildren(para);
33
        }
26
    }
34
    }
27
});
35
});
28
- 

Return to bug 37742