Bugzilla – Attachment 24986 Details for
Bug 11636
Impossible to remove patrons from patron list during add process
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 11636 - Impossible to remove patrons from patron list during add process
PASSED-QA-Bug-11636---Impossible-to-remove-patrons.patch (text/plain), 2.85 KB, created by
Katrin Fischer
on 2014-02-02 13:51:29 UTC
(
hide
)
Description:
[PASSED QA] Bug 11636 - Impossible to remove patrons from patron list during add process
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-02-02 13:51:29 UTC
Size:
2.85 KB
patch
obsolete
>From 837dbd91da2bacaaaf58d1f316e5e9c48578c6a6 Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Wed, 29 Jan 2014 12:17:09 -0500 >Subject: [PATCH] [PASSED QA] Bug 11636 - Impossible to remove patrons from > patron list during add process > >If you patrons have card numbers with leading zeroes this causes >problems removing patron entries during the process of adding patrons to >an existing list. This patch refactors the relevant JavaScript to >correct the problem and to remove inline "onclick" from generated HTML. > >This patch also includes a fix for Bug 11632 - Untranslatable string >"Remove" in patron lists. > >To test: > >1. If necessary, create or modify a patron to have a card number > with leading zeroes. >2. Go to Tools -> Patron lists. >3. Click "Add patrons" on an existing list. >4. Perform a patron search and choose one of the results. >5. Click the "remove" link next to the patron name which was just added. > Nothing will happen. >6. Apply the patch and test again. The "remove" link should now work. > >To test the fix for Bug 11632, after applying the patch run "translate >update [language code]" and confirm that the "Remove" string is listed >in the updated po file for patron_lists/list.tt. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Passes all tests and QA script, works as described. >--- > koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt >index b0717dd..fa30be5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt >@@ -27,10 +27,17 @@ $(document).ready(function() { > .append( "<a>" + item.surname + ", " + item.firstname + " (" + item.cardnumber + ") <small>" + item.address + " " + item.city + " " + item.zipcode + " " + item.country + "</small></a>" ) > .appendTo( ul ); > }; >+ >+ $("body").on("click",".removePatron",function(e){ >+ e.preventDefault(); >+ var divid = $(this).parent().attr("id"); >+ var cardnumber = divid.replace("borrower_",""); >+ RemovePatron(cardnumber); >+ }); > }); > > function AddPatron( name, cardnumber ) { >- div = "<div id='borrower_" + cardnumber + "'>" + name + " ( <a href='javascript:void()' onclick='RemovePatron(" + cardnumber + ");'> Remove </a> ) <input type='hidden' name='patrons_to_add' value='" + cardnumber + "' /></div>"; >+ div = "<div id='borrower_" + cardnumber + "'>" + name + " ( <a href='#' class='removePatron'> " + _("Remove") + " </a> ) <input type='hidden' name='patrons_to_add' value='" + cardnumber + "' /></div>"; > $('#patrons_to_add').append( div ); > > $('#find_patron').val('').focus(); >-- >1.8.3.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 11636
:
24870
|
24905
| 24986