@@ -, +, @@ - On the initial holds screen should see tabs for "Patrons" and "Clubs." Both should work correctly. - Select a patron to place the hold for. - On the page where you enter hold details (pickup library, hold expiration, etc.) there should be no JavaScript error in the console. --- .../prog/en/modules/reserve/request.tt | 23 +++++++++++-------- 1 file changed, 13 insertions(+), 10 deletions(-) --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/reserve/request.tt @@ -1194,16 +1194,19 @@ } }); - [% SET active = clubs ? 1 : 0 %] - /* Set active tab based on whether a club search was submitted */ - var tabs = $("#circ_holds_select li:eq(" + [% active | $raw %] + ") a").tab("show"); - $( tabs[0].hash ).find("input.focus").focus(); - - /* Change active focus when tabs change */ - $("#circ_holds_select a[data-toggle='tab']").on("shown.bs.tab", function (e) { - active_tab = e.target.hash; - $( active_tab ).find("input.focus").focus(); - }); + if( $("#circ_holds_select").length > 0 ){ + [% SET active = clubs ? 1 : 0 %] + /* Set active tab based on whether a club search was submitted */ + var tabs = $("#circ_holds_select li:eq(" + [% active | $raw %] + ") a").tab("show"); + $( tabs[0].hash ).find("input.focus").focus(); + + /* Change active focus when tabs change */ + $("#circ_holds_select a[data-toggle='tab']").on("shown.bs.tab", function (e) { + active_tab = e.target.hash; + $( active_tab ).find("input.focus").focus(); + }); + } + function ToggleHoldsToPlace() { if ( $("#requestany").prop('checked') ) { --