From 33f16cb5ff558dcb03740d862f2eba99ef077d6a Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 15 Jan 2024 16:45:03 +0000 Subject: [PATCH] Bug 35813: Add success feedback after placing/editing bookings This patch restores the lost behaviour that a successful add/edit of a booking via the 'Place booking' modal should notify the end user that the submission was sucessful. Test plan 1) Set an item as bookable to expose the 'Place booking' button 2) Place a new booking from the following pages and confirm that you now recieve feedback. * Catalog > Title > Details * Catalog > Title > MARC details * Catalog > Title > ISBD details * Catalog > Title > Item details * Catalog > Title > Bookings 3) Edit a booking on the 'Catalog > Title > Bookings' page and confirm you now recieve feedback. Signed-off-by: Owen Leonard --- koha-tmpl/intranet-tmpl/prog/en/modules/bookings/list.tt | 1 + .../prog/en/modules/catalogue/ISBDdetail.tt | 1 + .../prog/en/modules/catalogue/MARCdetail.tt | 1 + .../intranet-tmpl/prog/en/modules/catalogue/detail.tt | 1 + .../prog/en/modules/catalogue/moredetail.tt | 4 ++-- koha-tmpl/intranet-tmpl/prog/js/place_booking_modal.js | 9 +++++++++ 6 files changed, 15 insertions(+), 2 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 a8f51d3e197..a259ad863eb 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/bookings/list.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/bookings/list.tt @@ -38,6 +38,7 @@
+
[% INCLUDE 'cat-toolbar.inc' %]

Bookings for [% INCLUDE 'biblio-title-head.inc' %]

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt index 28d960abefb..736045f9797 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/ISBDdetail.tt @@ -48,6 +48,7 @@
[% INCLUDE 'messages.inc' %] +
[% INCLUDE 'cat-toolbar.inc' %]

[% IF ( unknownbiblionumber ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt index ef6588157df..06eea4f4072 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/MARCdetail.tt @@ -55,6 +55,7 @@
The record you requested does not exist ([% biblionumber | html %]).
[% ELSE %] +
[% INCLUDE 'cat-toolbar.inc' %] [% UNLESS ( popup ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 9764f45735d..1f7dfb2d44a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -92,6 +92,7 @@ [% CoceHost = Koha.Preference('CoceHost') %] [% SyndeticsCovers = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsCoverImages') %] +
[% INCLUDE 'cat-toolbar.inc' %] [% IF ( ocoins ) %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt index 0f00e7b8738..bedb4fbb7c9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/moredetail.tt @@ -42,11 +42,11 @@
[% INCLUDE 'messages.inc' %] +
+ [% INCLUDE 'cat-toolbar.inc' %]

Item details for [% INCLUDE 'biblio-title-head.inc' %]

- [% INCLUDE 'cat-toolbar.inc' %] -

[% title | html %]

diff --git a/koha-tmpl/intranet-tmpl/prog/js/place_booking_modal.js b/koha-tmpl/intranet-tmpl/prog/js/place_booking_modal.js index 946be01e3cd..a86d0944553 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/place_booking_modal.js +++ b/koha-tmpl/intranet-tmpl/prog/js/place_booking_modal.js @@ -489,6 +489,9 @@ $("#placeBookingForm").on('submit', function(e) { // Update bookings counts $('.bookings_count').html(parseInt($('.bookings_count').html(), 10)+1); + // Set feedback + $('#transient_result').replaceWith('
'+_("Booking successfully placed")+'
'); + // Close modal $('#placeBookingModal').modal('hide'); }); @@ -540,6 +543,12 @@ $("#placeBookingForm").on('submit', function(e) { timeline.focus(data.booking_id); } +<<<<<<< HEAD +======= + // Set feedback + $('#transient_result').replaceWith('
'+_("Booking successfully updated")+'
'); + +>>>>>>> 9195757e2f1 (Bug 35813: Add success feedback after placing/editing bookings) // Close modal $('#placeBookingModal').modal('hide'); }); -- 2.43.2