Bugzilla – Attachment 170744 Details for
Bug 37742
My virtual card error message not showing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 37742: Fix error display
Bug-37742-Fix-error-display.patch (text/plain), 1.84 KB, created by
David Cook
on 2024-08-27 03:52:41 UTC
(
hide
)
Description:
Bug 37742: Fix error display
Filename:
MIME Type:
Creator:
David Cook
Created:
2024-08-27 03:52:41 UTC
Size:
1.84 KB
patch
obsolete
>From b10d07912e1e61d8c1c30665a0f83977694a2b7d Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Tue, 27 Aug 2024 03:50:44 +0000 >Subject: [PATCH] Bug 37742: Fix error display > >This change fixes the display of the error message on "My virtual card" >on the OPAC. > >Test plan: >0. Apply the patch and enable syspref "OPACVirtualCard" >1. Go to http://localhost:8081/cgi-bin/koha/members/memberentry.pl >?op=edit_form&destination=circ&borrowernumber=51 >2. Add an asterisk (*) to the end of the card number >3. Go to http://localhost:8080/cgi-bin/koha/opac-virtual-card.pl >4. Note that the error message appears as follows: >Code 39 must contain only digits, capital letters, spaces and the symbols -.$/+% >--- > koha-tmpl/opac-tmpl/bootstrap/js/barcode-generator.js | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/barcode-generator.js b/koha-tmpl/opac-tmpl/bootstrap/js/barcode-generator.js >index 97628ba7fa..0ff0f6c49b 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/js/barcode-generator.js >+++ b/koha-tmpl/opac-tmpl/bootstrap/js/barcode-generator.js >@@ -22,6 +22,14 @@ document.addEventListener("DOMContentLoaded", function() { > const errorMessage = match ? match[1] : error.message; > > console.error(error); >- document.getElementById('barcode-container').innerHTML = "<p><strong>" + __("Error:") + " </strong>${errorMessage}</p>"; >+ if (errorMessage){ >+ const para = document.createElement('p'); >+ const strong = document.createElement('strong'); >+ strong.textContent = __("Error: "); >+ let err_msg = document.createTextNode(errorMessage); >+ para.appendChild(strong); >+ para.appendChild(err_msg); >+ document.getElementById('barcode-container').replaceChildren(para); >+ } > } > }); >-- >2.39.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 37742
:
170744
|
170850
|
171159
|
173355