Bugzilla – Attachment 167697 Details for
Bug 7782
Replace yes/no for cancelling holds with checkboxes and add delete link in patron account
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7782: Replace yes/no dropdown with checkboxes for cancelling holds
Bug-7782-Replace-yesno-dropdown-with-checkboxes-fo.patch (text/plain), 3.91 KB, created by
Lucas Gass (lukeg)
on 2024-06-13 20:42:28 UTC
(
hide
)
Description:
Bug 7782: Replace yes/no dropdown with checkboxes for cancelling holds
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2024-06-13 20:42:28 UTC
Size:
3.91 KB
patch
obsolete
>From 4629d70aead47077cce68beb4ce5d8f24f9ea683 Mon Sep 17 00:00:00 2001 >From: Sam Lau <samalau@gmail.com> >Date: Thu, 13 Jun 2024 20:08:40 +0000 >Subject: [PATCH] Bug 7782: Replace yes/no dropdown with checkboxes for > cancelling holds > >This patch replaces the yes/no options for selecting which holds to cancel with checkboxes. Furthermore, a select all/none link was added to the column header for even easier selection. > >To test: >1) Request multiple holds (at least 3) on different bibs for the same patron. >2) Visit the patrons detail page. >3) Click on the holds table tab. >4) Notice in the "Delete?" column there is a "Yes/No" dropdown option for each hold. >5) Apply patch, restart_all >6) Notice now that there is a "Cancel?" column that has "select all | none" links along with a checkbox for each hold. >7) Click the select all link ensure it works as expect. Do the same for the select none link >8) Select one hold, then press the cancel marked holds button at the bottom. Open the table again and notice the hold was removed for the table. >9) Now press the 'select all' link and press cancel marked holds. Notice that the remaining holds are removed from the table. >10) Ensure that these holds were also correctly removed from the holds tab on that particular items page. > >Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> >--- > .../prog/en/includes/patron-detail-tabs.inc | 2 +- > koha-tmpl/intranet-tmpl/prog/js/holds.js | 15 +++++++++++---- > 2 files changed, 12 insertions(+), 5 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-detail-tabs.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-detail-tabs.inc >index b220d7952a..a297101a64 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-detail-tabs.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/patron-detail-tabs.inc >@@ -168,7 +168,7 @@ > <th>Expiration</th> > <th>Priority</th> > <th>Notes</th> >- <th>Delete?</th> >+ <th>Cancel? <p class="column-tool"><a href="#" id="CheckAllHolds">select all</a> | <a href="#" id="UncheckAllHolds">none</a></p></th> > <th>Suspend?</th> > <th>Status</th> > </tr> >diff --git a/koha-tmpl/intranet-tmpl/prog/js/holds.js b/koha-tmpl/intranet-tmpl/prog/js/holds.js >index e7a4ffa829..e899fd4a8a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/holds.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/holds.js >@@ -241,10 +241,7 @@ $(document).ready(function() { > { > "orderable": false, > "data": function( oObj ) { >- return "<select name='rank-request'>" >- +"<option value='n'>" + __("No") + "</option>" >- +"<option value='del'>" + __("Yes") + "</option>" >- + "</select>" >+ return "<input type='checkbox' class='cancel_hold' name='rank-request' value='del' " + (oObj.rankRequest === 'del' ? 'checked' : '') + ">" > + "<input type='hidden' name='biblionumber' value='" + oObj.biblionumber + "'>" > + "<input type='hidden' name='borrowernumber' value='" + borrowernumber + "'>" > + "<input type='hidden' name='reserve_id' value='" + oObj.reserve_id + "'>"; >@@ -478,4 +475,14 @@ $(document).ready(function() { > $("#hold-actions-form").submit(); > return false; > }); >+ >+ $("#CheckAllHolds").on("click",function(){ >+ $(".cancel_hold:visible").prop("checked", true); >+ return false; >+ }); >+ $("#UncheckAllHolds").on("click",function(){ >+ $(".cancel_hold:visible").prop("checked", false); >+ return false; >+ }); >+ > }); >-- >2.39.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 7782
:
8438
|
167696
|
167697
|
172981