Bugzilla – Attachment 159276 Details for
Bug 34479
Clear saved patron search selections after certain actions
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 34479: Add new files to templates
Bug-34479-Add-new-files-to-templates.patch (text/plain), 6.50 KB, created by
Matt Blenkinsop
on 2023-11-27 15:31:47 UTC
(
hide
)
Description:
Bug 34479: Add new files to templates
Filename:
MIME Type:
Creator:
Matt Blenkinsop
Created:
2023-11-27 15:31:47 UTC
Size:
6.50 KB
patch
obsolete
>From 3fd03490fe5df35925da68378032cb6bdc91dc68 Mon Sep 17 00:00:00 2001 >From: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> >Date: Mon, 27 Nov 2023 10:42:09 +0000 >Subject: [PATCH] Bug 34479: Add new files to templates > >This patch adds two newly created files to the templates to allow the patron selection history to be wiped or persisted as appropriate > >Test plan as per previous commit >--- > .../prog/en/modules/members/member.tt | 27 +++---------------- > .../prog/en/modules/members/merge-patrons.tt | 2 ++ > .../prog/en/modules/tools/modborrowers.tt | 4 ++- > 3 files changed, 9 insertions(+), 24 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >index 1fb3da1b0e..a5908a00aa 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/member.tt >@@ -155,6 +155,7 @@ > <div class="modal-footer"> > <button type="submit" id="add_to_patron_list_submit" class="btn btn-default approve">Submit</button> > <button type="button" class="btn btn-default deny" data-dismiss="modal">Cancel</button> >+ [% PROCESS 'members-patron-selections.inc' id="new-patron-list_form" %] > </div> <!-- /.modal-footer --> > </form> <!-- /#new-patron-list_form --> > </div> <!-- /.modal-content --> >@@ -166,12 +167,9 @@ > [% INCLUDE 'columns_settings.inc' %] > [% INCLUDE 'str/members-menu.inc' %] > [% Asset.js("js/members-menu.js") | $raw %] >+ [% Asset.js("js/members-patron-selections.js") | $raw %] > [% INCLUDE 'select2.inc' %] > <script> >- function showPatronSelections( number ){ >- $("#table_search_selections").show().find("span").text(_("Patrons selected: " + number ) ); >- } >- > $(document).ready(function() { > $('#merge-patrons, #batch-mod-patrons').prop('disabled', true); > $('#memberresultst').on('change', 'input.selection', function() { >@@ -335,6 +333,8 @@ > /* Add a new entry to the menu */ > $("#patronlist-dropdown .divider").before('<li><a class="patron-list-add" href="#" data-listid="' + data.patron_list.patron_list_id + '">' + data.patron_list.name + '</li>'); > } >+ persistPatronSelections('new-patron-list_form'); >+ prepSelections(); > }, > error: function() { > alert( _("An error occurred. Patron list could not be updated.") ); >@@ -347,25 +347,6 @@ > } > } > >- function prepSelections(){ >- var selected_patrons = JSON.parse( localStorage.getItem("patron_search_selections") ); >- if( selected_patrons && selected_patrons.length > 0 ){ >- showPatronSelections( selected_patrons.length ); >- >- $('#merge-patrons').prop('disabled', true); >- $("input.selection").each(function(){ >- var cardnumber = $(this).val(); >- if( selected_patrons.indexOf( cardnumber ) >= 0 ){ >- $(this).prop("checked", true ); >- } >- }); >- >- if( selected_patrons.length > 1 ){ >- $('#batch-mod-patrons, #merge-patrons, #patronlist-menu').removeClass("disabled").prop('disabled', false); >- } >- } >- } >- > $('#memberresultst tbody').on('click','td',function(e){ > var $checkbox = $(this).find("input[type=checkbox]"); > if (e.target.type != "checkbox") { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/merge-patrons.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/merge-patrons.tt >index c3ac7a4e58..8677d69705 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/merge-patrons.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/merge-patrons.tt >@@ -158,6 +158,7 @@ > [% END %] > <input type="hidden" name="action" value="merge" /> > <input type="submit" id="merge-patrons" class="btn btn-primary" value="Merge patrons" /> >+ [% PROCESS 'members-patron-selections.inc' id="patron-merge-form" %] > </fieldset> > > [% ELSE %] >@@ -296,6 +297,7 @@ > [% MACRO jsinclude BLOCK %] > [% INCLUDE 'str/members-menu.inc' %] > [% Asset.js("js/members-menu.js") | $raw %] >+ [% Asset.js("js/members-patron-selections.js") | $raw %] > [% Asset.js("lib/jsdiff/jsdiff.min.js") | $raw %] > <script> > $(document).ready(function() { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >index 08680209f4..715b05e6b0 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/modborrowers.tt >@@ -219,7 +219,7 @@ > [% END %] > > [% IF ( op == 'show' ) %] >- <form name="f" action="modborrowers.pl" method="post"> >+ <form name="f" action="modborrowers.pl" method="post" id="batchmod-borrowers-form"> > <input type="hidden" name="op" value="do" /> > [% IF ( borrowers ) %] > <div class="btn-toolbar selections-toolbar"><a id="selectallbutton" href="#"><i class="fa fa-check"></i> Select all</a> | <a id="clearallbutton" href="#"><i class="fa fa-times"></i> Clear all</a></div> >@@ -409,6 +409,7 @@ > <fieldset class="action"> > <input type="submit" name="mainformsubmit" class="btn btn-primary" value="Save" /> > <a href="/cgi-bin/koha/tools/modborrowers.pl" class="cancel">Cancel</a> >+ [% PROCESS 'members-patron-selections.inc' id="batchmod-borrowers-form" %] > </fieldset> > </div> > </form> >@@ -436,6 +437,7 @@ > [% INCLUDE 'datatables.inc' %] > [% INCLUDE 'columns_settings.inc' %] > [% Asset.js("js/tools-menu.js") | $raw %] >+ [% Asset.js("js/members-patron-selections.js") | $raw %] > <script> > var patron_attributes_lib = new Array(); > var patron_attributes_values = new Array(); >-- >2.37.1 (Apple Git-137.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 34479
:
159261
|
159262
|
159275
|
159276
|
159295
|
159451
|
160906
|
160907
|
160982
|
161798