From cef4c56d6ec7197340f8f86184fd305ded5f4b2a 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 Signed-off-by: Kyle M Hall Signed-off-by: Katrin Fischer --- 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/modals/place_booking.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 47740506f8..8844279e47 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 9ad5d244ed..dfc82cbb25 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 75acf77a0b..6ed5494524 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 be34655b04..a0d6a86048 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 aabed1ca3b..2e43b3c45f 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/modals/place_booking.js b/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js index bd09384fb9..9d39f57fd1 100644 --- a/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js +++ b/koha-tmpl/intranet-tmpl/prog/js/modals/place_booking.js @@ -788,6 +788,9 @@ $("#placeBookingForm").on("submit", function (e) { parseInt($(".bookings_count").html(), 10) + 1 ); + // Set feedback + $('#transient_result').replaceWith('
'+_("Booking successfully placed")+'
'); + // Close modal $("#placeBookingModal").modal("hide"); }); @@ -849,6 +852,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.39.5