diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt index 1f3991dff3..3db7031439 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/concerns.tt @@ -36,11 +36,11 @@
- Include resolved + Include resolved [% FOR st IN status %] - Hide [% st.lib | html %] - + Hide [% st.lib | html %] + [% END %]
@@ -89,9 +89,10 @@ source: "catalog", status: function () { let avfilters = ["-and"]; - document.querySelectorAll(".status-filter-checkbox:checked").forEach(el => { - let av = el.id.split("_")[1]; - avfilters.push({ "!=": av }); + statuses.forEach(s => { + if ($(`#hide_${s.authorised_value}`).is(":checked")) { + avfilters.push({ "!=": s.authorised_value }); + } }); if (avfilters.length === 1) { @@ -263,9 +264,9 @@ var txtInactivefilter = _("Hide resolved"); function adjust_filter_label() { if ($("#hide_resolved_concerns").is(":checked")) { - $("#resolved_filter").html(' ' + txtActivefilter); + $("#resolved_filter").html(' ' + txtActivefilter); } else { - $("#resolved_filter").html(' ' + txtInactivefilter); + $("#resolved_filter").html(' ' + txtInactivefilter); } } $("#resolved_filter").on("click", function () { @@ -282,9 +283,9 @@ $(`#${av}_filter`).on("click", function () { if ($(`#hide_${av}`).is(":checked")) { - $(this).html(' ' + _("Hide ") + st.lib); + $(this).html(' ' + _("Hide ") + st.lib); } else { - $(this).html(' ' + _("Include ") + st.lib); + $(this).html(' ' + _("Include ") + st.lib); } $(`#hide_${av}`).prop("checked", !$(`#hide_${av}`).is(":checked")); tickets.DataTable().draw();