Bug 38222: Use comboboxes in circ/circulation.pl, bookings/list.pl, members/moremember.pl
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>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
26b1a4439a
commit
6a9f45686e
|
|
@ -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 %]
|
||||
|
|
|
|||
|
|
@ -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' %]
|
||||
|
|
|
|||
|
|
@ -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 %]
|
||||
|
|
|
|||
Loading…
Reference in New Issue