From eeba1ef891aa685edd6cb82b58f9ac02a611ca9e Mon Sep 17 00:00:00 2001
From: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Date: Mon, 20 Dec 2021 13:49:44 +0100
Subject: [PATCH] Bug 29737: Remove some unecessary parameters

We don't need them. We could also remove the biblionumber but it
requires change to the controller I'd prefer to not do now.
---
 koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc | 2 +-
 koha-tmpl/intranet-tmpl/prog/js/holds.js                 | 4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc
index 28573796c8e..be1f6458cae 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc
+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc
@@ -201,7 +201,7 @@
             <td>
                 [% IF Koha.Preference('SuspendHoldsIntranet') %]
                     [% UNLESS ( hold.found ) %]
-                        <button class="btn btn-default btn-xs toggle-suspend" data-reserve-id="[% hold.reserve_id | html %]" data-borrowernumber="[% hold.borrowernumber | html %]" data-biblionumber="[% hold.biblionumber | html %]" data-date="[% hold.date | html %]">
+                        <button class="btn btn-default btn-xs toggle-suspend" data-reserve-id="[% hold.reserve_id | html %]" data-biblionumber="[% hold.biblionumber | html %]">
                             [% IF ( hold.suspend ) %]
                                 <i class="fa fa-play" aria-hidden="true"></i> Unsuspend
                             [% ELSE %]
diff --git a/koha-tmpl/intranet-tmpl/prog/js/holds.js b/koha-tmpl/intranet-tmpl/prog/js/holds.js
index aac69d56e20..d599b03883a 100644
--- a/koha-tmpl/intranet-tmpl/prog/js/holds.js
+++ b/koha-tmpl/intranet-tmpl/prog/js/holds.js
@@ -431,11 +431,9 @@ $(document).ready(function() {
     $(".toggle-suspend").on('click', function(e) {
         e.preventDefault();
         let reserve_id     = $(this).data('reserve-id');
-        let borrowernumber = $(this).data('borrowernumber');
         let biblionumber   = $(this).data('biblionumber');
-        let date           = $(this).data('date');
         let suspend_until  = $('#suspend_until_' + reserve_id).val();
-        window.location.href='request.pl?action=toggleSuspend&amp;reserve_id=' + reserve_id + '&amp;borrowernumber=' + borrowernumber + '&amp;biblionumber=' + biblionumber + '&amp;date=' + date + '&amp;suspend_until=' + suspend_until;
+        window.location.href='request.pl?action=toggleSuspend&amp;reserve_id=' + reserve_id + '&amp;biblionumber=' + biblionumber + '&amp;suspend_until=' + suspend_until;
         return false;
     });
 });
-- 
2.25.1