https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35535
--- Comment #1 from Andreas Jonsson <[email protected]> --- This will happen if there are no authorised values in the category HOLD_CANCELLATION, because no select input element will be rendered in this case so the javascript code references an undefined element. This could be made more robust by adding a default reason if the element is missing: diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt index 2abde7f9c5..92a375531e 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt @@ -1562,7 +1562,8 @@ this.form.submit(); }); $('.cancel-hold').on("click",function(e){ - let cancel_reason = document.getElementById('cancellation-reason').value; + const r = document.getElementById('cancellation-reason'); + let cancel_reason = r ? r.value : 'Manually cancelled'; this.form.cancel_reserve.value = 1; this.form.cancel_reason.value = cancel_reason; this.form.submit(); -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
