Bugzilla – Attachment 128803 Details for
Bug 29737
Cannot suspend holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 29737: Fix suspend from hold list
Bug-29737-Fix-suspend-from-hold-list.patch (text/plain), 3.14 KB, created by
Katrin Fischer
on 2021-12-20 23:09:58 UTC
(
hide
)
Description:
Bug 29737: Fix suspend from hold list
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2021-12-20 23:09:58 UTC
Size:
3.14 KB
patch
obsolete
>From f0b7e11605e0d59f1f7e1b9fd4264cc83cedd91a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 20 Dec 2021 13:45:04 +0100 >Subject: [PATCH] Bug 29737: Fix suspend from hold list > >From holds list of a bibliographic record, the "unsuspend" button does not work as expected. >The form is submitted but the suspension is still there. > >There are 3 requests, 2 GET and 1 POST. >One of the GET is rejected by Firefox (NS_BINDING_ABORTED) > >Test plan: >Place some items on hold, play with suspend/unsuspend from the hold list >/cgi-bin/koha/reserve/request.pl?biblionumber=XX > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >--- > koha-tmpl/intranet-tmpl/prog/en/includes/holds_table.inc | 2 +- > koha-tmpl/intranet-tmpl/prog/js/holds.js | 11 +++++++++++ > 2 files changed, 12 insertions(+), 1 deletion(-) > >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 99a6bef496..28573796c8 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" onclick="window.location.href='request.pl?action=toggleSuspend&reserve_id=[% hold.reserve_id | html %]&borrowernumber=[% hold.borrowernumber | html %]&biblionumber=[% hold.biblionumber | html %]&date=[% hold.date | html %]&suspend_until=' + $('#suspend_until_[% hold.reserve_id | html %]').val()"> >+ <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 %]"> > [% 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 5570716f52..aac69d56e2 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/holds.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/holds.js >@@ -427,4 +427,15 @@ $(document).ready(function() { > $('#suspend-modal').modal('hide'); > }); > }); >+ >+ $(".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&reserve_id=' + reserve_id + '&borrowernumber=' + borrowernumber + '&biblionumber=' + biblionumber + '&date=' + date + '&suspend_until=' + suspend_until; >+ return false; >+ }); > }); >-- >2.11.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 29737
:
128754
|
128755
|
128780
|
128781
| 128803 |
128804