Bug 38222: (QA follow-up) DRY event listener setup for combobox resets on modal close
Sponsored-by: Büchereizentrale Schleswig-Holstein <https://www.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
c297b9b10a
commit
878c78400c
|
|
@ -386,10 +386,6 @@
|
|||
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;
|
||||
|
|
|
|||
|
|
@ -1148,11 +1148,6 @@
|
|||
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' %]
|
||||
|
|
|
|||
|
|
@ -832,10 +832,6 @@
|
|||
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 %]
|
||||
|
|
|
|||
|
|
@ -6,6 +6,12 @@
|
|||
.getElementById("cancelBookingForm")
|
||||
?.addEventListener("submit", handleSubmit);
|
||||
|
||||
document
|
||||
.getElementById("cancelBookingModal")
|
||||
?.addEventListener("hide.bs.modal", () => {
|
||||
$("#cancellation-reason").comboBox("reset");
|
||||
});
|
||||
|
||||
async function handleSubmit(e) {
|
||||
e.preventDefault();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue