Bugzilla – Attachment 165434 Details for
Bug 36120
Add pickup locations to bookings
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36120: Restore edit
Bug-36120-Restore-edit.patch (text/plain), 4.69 KB, created by
Nick Clemens (kidclamp)
on 2024-04-23 17:42:57 UTC
(
hide
)
Description:
Bug 36120: Restore edit
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2024-04-23 17:42:57 UTC
Size:
4.69 KB
patch
obsolete
>From 130a697d8d8f0c74372e7217caf1d6517ccca7f1 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Fri, 19 Apr 2024 16:39:46 +0100 >Subject: [PATCH] Bug 36120: Restore edit > >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > koha-tmpl/intranet-tmpl/prog/en/modules/bookings/list.tt | 5 +++-- > koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js | 9 ++++++++- > 2 files changed, 11 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/bookings/list.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/bookings/list.tt >index b0d69114232..47740506f89 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/bookings/list.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/bookings/list.tt >@@ -106,6 +106,7 @@ > id: booking.booking_id, > booking: booking.booking_id, > patron: booking.patron_id, >+ pickup_library: booking.pickup_library_id, > start: dayjs(booking.start_date).toDate(), > end: dayjs(booking.end_date).toDate(), > content: $patron_to_html(booking.patron, { >@@ -167,7 +168,7 @@ > // set end datetime hours and minutes to the end of the day > let endDate = dayjs(data.end).endOf('day'); > >- $('#placeBookingModal').modal('show', $('<button data-booking="'+data.id+'" data-biblionumber="[% biblionumber | uri %]" data-itemnumber="'+data.group+'" data-patron="'+data.patron+'" data-start_date="'+startDate.toISOString()+'" data-end_date="'+endDate.toISOString()+'">')); >+ $('#placeBookingModal').modal('show', $('<button data-booking="'+data.id+'" data-biblionumber="[% biblionumber | uri %]" data-itemnumber="'+data.group+'" data-patron="'+data.patron+'" data-pickup_library="'+data.pickup_library+'" data-start_date="'+startDate.toISOString()+'" data-end_date="'+endDate.toISOString()+'">')); > $('#placeBookingModal').on('hide.bs.modal', function(e) { > if (update_success) { > update_success = 0; >@@ -273,7 +274,7 @@ > "render": function(data, type, row, meta) { > let result = ""; > [% IF CAN_user_circulate_manage_bookings %] >- result += '<button type="button" class="btn btn-default btn-xs edit-action" data-toggle="modal" data-target="#placeBookingModal" data-booking="'+row.booking_id+'" data-biblionumber="[% biblionumber | uri %]" data-itemnumber="'+row.item_id+'" data-patron="'+row.patron_id+'" data-start_date="'+row.start_date+'" data-end_date="'+row.end_date+'"><i class="fa fa-pencil" aria-hidden="true"></i> '+_("Edit")+'</button>'; >+ result += '<button type="button" class="btn btn-default btn-xs edit-action" data-toggle="modal" data-target="#placeBookingModal" data-booking="'+row.booking_id+'" data-biblionumber="[% biblionumber | uri %]" data-itemnumber="'+row.item_id+'" data-patron="'+row.patron_id+'" data-pickup_library="'+row.pickup_library_id+'" data-start_date="'+row.start_date+'" data-end_date="'+row.end_date+'"><i class="fa fa-pencil" aria-hidden="true"></i> '+_("Edit")+'</button>'; > result += '<button type="button" class="btn btn-default btn-xs cancel-action" data-toggle="modal" data-target="#cancelBookingModal" data-booking="'+row.booking_id+'"><i class="fa fa-trash" aria-hidden="true"></i> '+_("Cancel")+'</button>'; > [% END %] > return result; >diff --git a/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js b/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js >index a649408f176..51ced2a8a17 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js >@@ -31,6 +31,7 @@ $("#placeBookingModal").on("show.bs.modal", function (e) { > $("#booking_biblio_id").val(biblionumber); > > let patron_id = button.data("patron") || 0; >+ let pickup_library_id = button.data("pickup_library"); > booking_item_id = button.data("itemnumber"); > let start_date = button.data("start_date"); > let end_date = button.data("end_date"); >@@ -166,7 +167,13 @@ $("#placeBookingModal").on("show.bs.modal", function (e) { > }); > > $pickupSelect.prop("disabled", false); >- $pickupSelect.val(null).trigger("change"); >+ >+ // If pickup_library alread exists, pre-select >+ if (pickup_library_id) { >+ $pickupSelect.val(pickup_library_id).trigger("change"); >+ } else { >+ $pickupSelect.val(null).trigger("change"); >+ } > } > > // Item select2 >-- >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 36120
:
162911
|
162912
|
162914
|
162915
|
162916
|
162917
|
162918
|
162919
|
162920
|
162921
|
162922
|
162923
|
162924
|
162925
|
162926
|
162927
|
162928
|
162976
|
163218
|
163219
|
163220
|
163221
|
163222
|
163223
|
163224
|
163435
|
163436
|
163437
|
163438
|
163439
|
163440
|
163441
|
163442
|
163443
|
163444
|
163445
|
163446
|
163447
|
163448
|
163565
|
163566
|
163567
|
163568
|
163569
|
163570
|
163571
|
163603
|
163604
|
163605
|
163606
|
163607
|
163608
|
163609
|
163610
|
163611
|
163612
|
163613
|
163635
|
163636
|
165140
|
165175
|
165176
|
165177
|
165178
|
165179
|
165180
|
165181
|
165182
|
165183
|
165184
|
165185
|
165186
|
165187
|
165188
|
165214
|
165215
|
165216
|
165419
|
165420
|
165421
|
165422
|
165423
|
165424
|
165425
|
165426
|
165427
|
165428
|
165429
|
165430
|
165431
|
165432
|
165433
|
165434
|
165435
|
165984
|
165985
|
165986
|
165987
|
165988
|
165989
|
165990
|
165991
|
165992
|
165993
|
165994
|
165995
|
165996
|
165997
|
165998
|
165999
|
166000
|
166001
|
166002