From 964a1888138e276a78be5d84a70559ace6418e79 Mon Sep 17 00:00:00 2001 From: Julian Maurice Date: Mon, 9 May 2016 11:42:05 +0200 Subject: [PATCH] Bug 13041: Fix add of basket's manager when name contains a single quote If you are trying to add a user as a manager of a basket in acquisitions, a JavaScript error will be triggered if that user has a single quote in their name (e.g. "O'Neil"). This patch corrects the issue. Also changed by this patch: Increased the size of the patron search popup and made a correction to some invalid HTML. To test you should have a patron whose name contains a single quote who is also a user with permission to manage acquisitions. - Apply the patch and go to Acquisitions. - Locate an open basket and view the details for that basket. - In the "Managed by" section, click the "Add user" button to trigger the patron search popup. - Search for the patron described above and click the "Add" button. - In the parent window, the patron you chose should have been added to the "Managed by" section. Signed-off-by: Julian Maurice --- koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt | 2 +- .../prog/en/modules/acqui/tables/members_results.tt | 2 +- koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt index 1de1934c89..a2c9b67126 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -105,7 +105,7 @@ window.open( "/cgi-bin/koha/acqui/add_user_search.pl", 'UserSearchPopup', - 'width=740, height=450, scrollbars=yes, toolbar=no,' + 'width=840, height=500, scrollbars=yes, toolbar=no,' ); } diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/tables/members_results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/tables/members_results.tt index ef325f3aa5..069a56a31d 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/tables/members_results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/tables/members_results.tt @@ -18,7 +18,7 @@ [%- IF selection_type == 'select' -%] "Select" [%- ELSE -%] - "Select" + "Select" [%- END -%] }[% UNLESS loop.last %],[% END %] [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt index 20af6d064a..ff8ed90075 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/common/patron_search.tt @@ -192,7 +192,7 @@ function filterByFirstLetterSurname(letter) { -
+
[% IF patrons_with_acq_perm_only %]
Only staff with superlibrarian or acquisitions permissions (or order_manage permission if granular permissions are enabled) are returned in the search results
-- 2.39.5