Bugzilla – Attachment 187192 Details for
Bug 38438
Make Add persistent selections and batch operations to item search optional
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38438: Forget item selections on a new search
Bug-38438-Forget-item-selections-on-a-new-search.patch (text/plain), 2.70 KB, created by
Martin Renvoize (ashimema)
on 2025-10-01 13:30:49 UTC
(
hide
)
Description:
Bug 38438: Forget item selections on a new search
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2025-10-01 13:30:49 UTC
Size:
2.70 KB
patch
obsolete
>From 18827524895d99f096800680c2f4c6fba28948e5 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 15 Aug 2025 18:55:36 +0000 >Subject: [PATCH] Bug 38438: Forget item selections on a new search > >This patch adds a new checkbox to the item search >"Forget item selections from previous search" > >This way, selections are remembered when paginating, and can optionally >be kept between searches, but defaults to clearing the storage on a enw search. > >To test: >1 - Do an item search for books, select two items >2 - Batch modify those items >3 - Do a new item search for music >4 - Select two items >5 - Batch delete them >6 - Note 4 items are going to be deleted >7 - Apply patch >8 - Start a new item search for books from centerville >9 - Note the form option to forget previous selections, leave it checked >10 - Do the search, select two items, batch modify, only 2! >11 - Start a new item search, uncheck the box, search >12 - Select two and batch modify, 4 items are sent! >13 - Popcorn! > >Signed-off-by: Ludovic Julien <ludovic.julien@inLibro.com> >Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> >--- > .../intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt | 7 +++++++ > 1 file changed, 7 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >index e637321abac..ad2f23ab244 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt >@@ -236,6 +236,10 @@ > <a href="/cgi-bin/koha/catalogue/search.pl" class="btn btn-default"><i class="fa fa-search"></i> Go to advanced search</a> > </div> > </div> >+ <fieldset id="itemselection"> >+ <label class="form-field-label">Forget item selections from previous search</label> >+ <input type="checkbox" name="forget_item_selections" id="forget_item_selections" value="forget_item_selections" checked="checked" /> >+ </fieldset> > <fieldset id="librarylocation"> > [% INCLUDE form_field_select name="homebranch" options = branches %] > [% INCLUDE form_field_select name="holdingbranch" options = branches %] >@@ -757,6 +761,9 @@ > > $('#itemsearchform').submit(function() { > var searchform = $(this); >+ if( $("#forget_item_selections").is(':checked') ){ >+ localStorage.removeItem("item_search_selections"); >+ } > var format = searchform.find('input[name="format"]:checked').val(); > if (format == 'html') { > submitForm(searchform); >-- >2.51.0
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 38438
:
185476
|
185626
|
186106
| 187192