Bugzilla – Attachment 173315 Details for
Bug 38222
Let staff pick a cancellation reason when canceling a booking
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 38222: Use comboboxes in circ/circulation.pl, bookings/list.pl, members/moremember.pl
Bug-38222-Use-comboboxes-in-circcirculationpl-book.patch (text/plain), 4.99 KB, created by
Martin Renvoize (ashimema)
on 2024-10-25 07:28:32 UTC
(
hide
)
Description:
Bug 38222: Use comboboxes in circ/circulation.pl, bookings/list.pl, members/moremember.pl
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2024-10-25 07:28:32 UTC
Size:
4.99 KB
patch
obsolete
>From c48cc977d82d665eed894535bb1729960c45ea3d Mon Sep 17 00:00:00 2001 >From: Paul Derscheid <paul.derscheid@lmscloud.de> >Date: Wed, 23 Oct 2024 16:44:47 +0000 >Subject: [PATCH] Bug 38222: Use comboboxes in circ/circulation.pl, > bookings/list.pl, members/moremember.pl >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >To test: >1) Apply dependencies and this patch >2) Maybe update class files w/ update_dbix_class_files.pl >3) Build a new bundle w/ yarn api:bundle >4) Restart plack >5) Add a couple bookings to a patron >6) Go to any of the above modules >7) Cancel the booking and note > 7.1) That the value you input is correctly received by the backend for cancellation_reason > 7.2) Do it for the other 2 modules >8) Configure some authorised values under category BOOKING_CANCELLATION >9) Repeat 7 and note that you can select them in the combobox >10) Sign off or leave your feedback > >Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.bz-sh.de/> >Signed-off-by: LEBSimonsen <simonsen@bz-sh.de> >Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> >--- > .../intranet-tmpl/prog/en/modules/bookings/list.tt | 11 ++++++++++- > .../intranet-tmpl/prog/en/modules/circ/circulation.tt | 10 ++++++++++ > .../prog/en/modules/members/moremember.tt | 10 ++++++++++ > 3 files changed, 30 insertions(+), 1 deletion(-) > >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 6619b20e00e..2610464c658 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/bookings/list.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/bookings/list.tt >@@ -84,6 +84,7 @@ > <script>dayjs.extend(window.dayjs_plugin_isSameOrBefore)</script> > [% Asset.js("js/modals/place_booking.js") | $raw %] > [% Asset.js("js/cancel_booking_modal.js") | $raw %] >+ [% Asset.js("js/combobox.js") | $raw %] > <script> > var cancel_success = 0; > var update_success = 0; >@@ -380,6 +381,15 @@ > ), > ); > >+ $("#cancellation-reason").comboBox({ >+ displayProperty: 'name', >+ placeholder: _("Select or type a reason"), >+ }); >+ >+ document.getElementById("cancelBookingModal")?.addEventListener('hide.bs.modal', () => { >+ $("#cancellation-reason").comboBox('reset'); >+ }); >+ > function handleFilter(e, text, filterStates) { > const target = e.target; > const { filter } = target.dataset; >@@ -400,7 +410,6 @@ > > target.classList.toggle("filtered"); > } >- > }); > </script> > [% END %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >index c31e66bd869..26a89d1e838 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/circulation.tt >@@ -1026,6 +1026,7 @@ > [% Asset.js("js/holds.js") | $raw %] > [% INCLUDE 'calendar.inc' %] > [% Asset.js("js/cancel_booking_modal.js") | $raw %] >+ [% Asset.js("js/combobox.js") | $raw %] > [% INCLUDE 'js-biblio-format.inc' %] > <script> > table_settings_issues_table = [% TablesSettings.GetTableSettings( 'circ', 'circulation', 'issues-table', 'json' ) | $raw %] >@@ -1143,6 +1144,15 @@ > $('#mainform').submit(); > } > >+ $("#cancellation-reason").comboBox({ >+ displayProperty: 'name', >+ placeholder: _("Select or type a reason"), >+ }); >+ >+ document.getElementById("cancelBookingModal")?.addEventListener('hide.bs.modal', () => { >+ $("#cancellation-reason").comboBox('reset'); >+ }); >+ > }); > </script> > [% INCLUDE 'str/members-menu.inc' %] >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >index 99d09c27078..7e0c205b45f 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt >@@ -768,6 +768,7 @@ > [% Asset.js("js/holds.js") | $raw %] > [% INCLUDE 'calendar.inc' %] > [% Asset.js("js/cancel_booking_modal.js") | $raw %] >+ [% Asset.js("js/combobox.js") | $raw %] > [% INCLUDE 'js-biblio-format.inc' %] > [% INCLUDE 'str/members-menu.inc' %] > [% Asset.js("js/members-menu.js") | $raw %] >@@ -826,6 +827,15 @@ > $("#view_guarantees_finesandcharges").on("click", function () { > $("#guarantees_finesandcharges-tab").click(); > }); >+ >+ $("#cancellation-reason").comboBox({ >+ displayProperty: 'name', >+ placeholder: _("Select or type a reason"), >+ }); >+ >+ document.getElementById("cancelBookingModal")?.addEventListener('hide.bs.modal', () => { >+ $("#cancellation-reason").comboBox('reset'); >+ }); > }); > </script> > [% Asset.js("js/tables/bookings.js") | $raw %] >-- >2.47.0
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 38222
:
173230
|
173231
|
173232
|
173233
|
173264
|
173265
|
173277
|
173278
|
173281
|
173282
|
173312
|
173313
|
173314
| 173315 |
173316
|
173317
|
173318
|
173319
|
173320
|
173321
|
173322
|
173323
|
173336
|
173337
|
173338
|
173339