Bugzilla – Attachment 145404 Details for
Bug 32675
Cannot add a guarantor when there is a single quote in the guarantor attributes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32675: Cannot add a guarantor when there is a single quote in the guarantor attributes
Bug-32675-Cannot-add-a-guarantor-when-there-is-a-s.patch (text/plain), 2.67 KB, created by
Hammat wele
on 2023-01-18 17:40:57 UTC
(
hide
)
Description:
Bug 32675: Cannot add a guarantor when there is a single quote in the guarantor attributes
Filename:
MIME Type:
Creator:
Hammat wele
Created:
2023-01-18 17:40:57 UTC
Size:
2.67 KB
patch
obsolete
>From 55017f679285a23b0ddceb844dd5653450f79790 Mon Sep 17 00:00:00 2001 >From: Hammat Wele <hammat.wele@inlibro.com> >Date: Wed, 18 Jan 2023 17:40:26 +0000 >Subject: [PATCH] Bug 32675: Cannot add a guarantor when there is a single > quote in the guarantor attributes >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >It's impossible to select a guarantor when there is a single quote in the guarantor attributes. > >This patch allows to add a guarantor even if there is a single quote in guarantor attributes. > >Test plan >1. Find two patrons: > - Patron 1 = guarantee > - Patron 2 = guarantor >2. In the patron 2 account, add a single quote in one of the 'Alternate address' or 'Contact information' fields (like the 'Address' field) >for example type «L'Aqueduc» in the field and save >3. Edit the patron 1 and click on 'Add guarantor' >4. Search for the patron 2 >5. Click on 'Select' > --> Nothing happens >6. Apply the patch >9. repeat step 3, 4 and 5 >10. Now Patron 2 is added as guarantor >--- > koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >index b4589b1201..edf7cbf4ec 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search.inc >@@ -626,7 +626,7 @@ > [% FOR action IN actions %] > [% SWITCH action %] > [% CASE 'select' %] >- action_node += '<a href="#" class="btn btn-default btn-xs select_user" data-borrowernumber="' + patron_id + '">Select</a><input type="hidden" id="borrower_data' + patron_id + '" name="borrower_data'+ patron_id + '" value=\''+JSON.stringify(row)+'\' />'; >+ action_node += '<a href="#" class="btn btn-default btn-xs select_user" data-borrowernumber="' + patron_id + '">Select</a><input type="hidden" id="borrower_data' + patron_id + '" name="borrower_data'+ patron_id + '" value=\''+JSON.stringify(row).replace(/'/g, "'")+'\' />'; > [% CASE 'add' %] > action_node += '<a href="#" class="btn btn-default btn-xs add_user" data-borrowernumber="' + patron_id + '" data-firstname="' + encodeURIComponent(row.firstname) + '" data-surname="' + encodeURIComponent(row.surname) + '">Add</a><input type="hidden" id="borrower_data' + patron_id + '" name="borrower_data'+ patron_id + '" />'; > [% CASE 'edit' %] >-- >2.34.1
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 32675
:
145403
|
145404
|
145490
|
145880
|
147169
|
147699
|
147727