Bugzilla – Attachment 166835 Details for
Bug 36868
Add ability to automatically empty cart after placing holds ( staff interface and OPAC )
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36868: Logic for staff interface
Bug-36868-Logic-for-staff-interface.patch (text/plain), 2.40 KB, created by
Lucas Gass (lukeg)
on 2024-05-16 15:58:00 UTC
(
hide
)
Description:
Bug 36868: Logic for staff interface
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2024-05-16 15:58:00 UTC
Size:
2.40 KB
patch
obsolete
>From 64dcf7ffa08f5b12bcd8e55e2ec02468109d2d7f Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Thu, 16 May 2024 15:57:20 +0000 >Subject: [PATCH] Bug 36868: Logic for staff interface > >--- > .../prog/en/modules/reserve/request.tt | 28 +++++++++++++++++++ > 1 file changed, 28 insertions(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >index 7dca1e83ba..6d9b521a11 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt >@@ -1535,6 +1535,34 @@ > $.fn.select2.defaults.set("dropdownAutoWidth", true ); > > $(document).ready(function() { >+ >+ $("#hold-request-form").submit(function(e) { >+ e.preventDefault(); >+ $.ajax({ >+ url: "placerequest.pl", >+ type: "POST", >+ data: $(this).serialize(), >+ success: function(response) { >+ var encodedBiblionumbers = biblionumbers.map(number => encodeURIComponent(number)); >+ var joinedBiblionumbers = encodedBiblionumbers.join("&biblionumber="); >+ >+ [% IF Koha.Preference('AutoDeleteFromCartWhenHoldPlaced') %] >+ var delete_from_cart_promise = biblionumbers.map(bn => delSingleRecord(bn)); >+ // wait for bibs to be deleted from cart before redirecting >+ Promise.all(delete_from_cart_promise) >+ .then(() => { >+ window.location.href = "/cgi-bin/koha/reserve/request.pl?biblionumber=" + joinedBiblionumbers; >+ }); >+ [% ELSE %] >+ window.location.href = "/cgi-bin/koha/reserve/request.pl?biblionumber=" + joinedBiblionumbers; >+ [% END %] >+ }, >+ error: function(jqXHR, textStatus, errorThrown) { >+ console.error("Error submitting form:", textStatus, errorThrown); >+ } >+ }); >+ }); >+ > $('#cancellation-reason-fieldset').hide(); > $('.rank-request').on('change', function() { > if ( $(".rank-request option:selected[value='del']").length ) { >-- >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 36868
:
166834
|
166835
|
167558
|
167695
|
167699
|
167700
|
167701
|
167851
|
167852
|
167853
|
167854
|
167855
|
177760
|
177761
|
177762
|
177763
|
178640
|
178700
|
178701