From 6fcec196b005b510ec7e72a8e4924079ac01e391 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 6 Nov 2020 13:29:33 -0500 Subject: [PATCH] Bug 26633: Add ability to bookmark the page you are viewing Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- .../prog/en/modules/admin/transfer_limits.tt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transfer_limits.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transfer_limits.tt index 722f91295b..75a4512333 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transfer_limits.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/transfer_limits.tt @@ -265,6 +265,8 @@ }); $("#value_selector").on('change', function() { + const val = $('#value_selector').val(); + window.history.replaceState(null, "", `/cgi-bin/koha/admin/transfer_limits.pl?code=${val}`); updateTransferLimitsTable(); }); @@ -285,6 +287,14 @@ }); updateTransferLimitsTable(); + + const queryString = window.location.search; + const urlParams = new URLSearchParams(queryString); + const code = urlParams.get('code'); + if ( code ) { + $('#value_selector').val(code); + updateTransferLimitsTable(); + } }); function delLimit(checkbox) { -- 2.39.5