Bugzilla – Attachment 128404 Details for
Bug 28377
Use the API to suspend/resume holds
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28377: (28937 follow-up) Flatpickr change
Bug-28377-28937-follow-up-Flatpickr-change.patch (text/plain), 1.75 KB, created by
Martin Renvoize (ashimema)
on 2021-12-10 15:57:25 UTC
(
hide
)
Description:
Bug 28377: (28937 follow-up) Flatpickr change
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2021-12-10 15:57:25 UTC
Size:
1.75 KB
patch
obsolete
>From 857611879137e63f5c858cdf6fea2df3d1c4b1bb Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 9 Dec 2021 16:15:20 -0300 >Subject: [PATCH] Bug 28377: (28937 follow-up) Flatpickr change > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > koha-tmpl/intranet-tmpl/prog/js/holds.js | 11 +++++++---- > 1 file changed, 7 insertions(+), 4 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/holds.js b/koha-tmpl/intranet-tmpl/prog/js/holds.js >index 33849f8e41..d957c46af1 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/holds.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/holds.js >@@ -96,12 +96,15 @@ function display_pickup_location (state) { > $(document).ready(function() { > > function suspend_hold(hold_id, end_date) { >+ >+ var params; >+ if ( end_date !== null && end_date !== '' ) params = JSON.stringify({ "end_date": end_date }); >+ > return $.ajax({ > method: 'POST', > url: '/api/v1/holds/'+encodeURIComponent(hold_id)+'/suspension', >- data: function () { >- if ( end_date !== null ) return JSON.stringify({ "end_date": end_date }) >- } >+ contentType: 'application/json', >+ data: params > }); > } > >@@ -401,7 +404,7 @@ $(document).ready(function() { > > $("#suspend-modal-submit").on( "click", function( e ) { > e.preventDefault(); >- var suspend_until_date = $("#suspend-modal-until").datepicker("getDate"); >+ var suspend_until_date = $("#suspend-modal-until").val(); > if ( suspend_until_date !== null ) suspend_until_date = $date(suspend_until_date, {dateformat:"rfc3339"}); > suspend_hold( > $(this).data('hold-id'), >-- >2.20.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 28377
:
121129
|
121130
|
125052
|
125053
|
125057
|
125058
|
127270
|
127271
|
128380
|
128381
|
128402
|
128403
| 128404 |
128405
|
128458
|
128461