From 98a269669c45045529e081d3e02e70403e1bf477 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Fri, 16 Jun 2023 16:07:35 +0000 Subject: [PATCH] Bug 34082: Cut some redundancy in OPAC JavaScript string translations This patch consolidates some JS code so that we're not defining a string ine one place and using it once elsewhere. With JS-friendly translations tools we don't need this workaround. To test, apply the patch and go to Administration -> Circulation and fine rules. - Configure an item type rule with the "OPAC item level holds" setting set to "Force." - Log in to the OPAC and locate a record with that item type and multiple items. An example in the sample data: /cgi-bin/koha/opac-detail.pl?biblionumber=12 - Place a hold on the item. - The holds screen should show a table of items. - Open your browser's developer tools. - In the Console tab, paste in this code and hit ENTER: $(".checkitem").prop("checked", false); - All radio buttons in the table of items should be cleared. - Click the "Confirm hold" button. You should get an alert: "Expecting a specific item selection." - Log in to the OPAC and click the "Search history" tab from the user summary page. - Check one or more checkboxes next to search history items and click the "Remove selected searches." - You should get an alert: "Are you sure you want to delete selected search history entries?" - Log in to the OPAC, create a new list if necessary, and add some titles to the list. - Test that confirmation messages show correctly: - Deleting a single title by clicking the "Remove from this list" link. - Deleting multiple titles by checking boxes and clicking "Remove from list." - Deleting a list. - In Administration -> System preferences, enable TagsEnabled if necessary. - Log in to the OPAC and tag one or more items. - From the Tag cloud page, check one or more boxes for your tags, and click the "Delete selected tags" button at the bottom of the page. - The confirmation message should display correctly. - To test the change to opac-account.tt you have to install a payment plugin, e.g. https://gitlab.com/thekesolutions/plugins/koha-plugin-pay-via-paypal, and attempt to submit a payment which is below the minimum payment threshold set in the plugin's configuration. Signed-off-by: David Nind Signed-off-by: Kyle M Hall Signed-off-by: Katrin Fischer --- .../opac-tmpl/bootstrap/en/modules/opac-account.tt | 3 +-- .../opac-tmpl/bootstrap/en/modules/opac-reserve.tt | 10 +++------- .../bootstrap/en/modules/opac-search-history.tt | 4 +--- .../opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 4 ---- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt | 3 +-- 5 files changed, 6 insertions(+), 18 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt index f1ed9cc89f..684b4f4b14 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt @@ -79,7 +79,6 @@