Bugzilla – Attachment 128754 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.03 KB, created by
Jonathan Druart
on 2021-12-20 13:11:43 UTC
(
hide
)
Description:
Bug 29737: Fix suspend from hold list
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2021-12-20 13:11:43 UTC
Size:
3.03 KB
patch
obsolete
>From 7a97f9cbc5787e1c3787a72bf4a67896825a25e8 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 >--- > .../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 99a6bef4967..28573796c8e 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 5570716f523..aac69d56e20 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.25.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 29737
:
128754
|
128755
|
128780
|
128781
|
128803
|
128804