diff --git a/dspace-xmlui-mirage2/src/main/webapp/scripts/search-controls.js b/dspace-xmlui-mirage2/src/main/webapp/scripts/search-controls.js index 2425a314e5..c69028fc50 100644 --- a/dspace-xmlui-mirage2/src/main/webapp/scripts/search-controls.js +++ b/dspace-xmlui-mirage2/src/main/webapp/scripts/search-controls.js @@ -262,6 +262,12 @@ mainForm.find('input[name="' + param + '"]').val(value); } + + //DS-3835 ensure that the current scope is passed as form field "scope" + mainForm.find('input[name="current-scope"]') + .val($('select[name="scope"]').val()) + .attr("name","scope"); + //Clear the page param mainForm.find('input[name="page"]').val('1'); diff --git a/dspace-xmlui/src/main/webapp/static/js/discovery/search-controls.js b/dspace-xmlui/src/main/webapp/static/js/discovery/search-controls.js index 31458564e0..ddfe9c6ec6 100644 --- a/dspace-xmlui/src/main/webapp/static/js/discovery/search-controls.js +++ b/dspace-xmlui/src/main/webapp/static/js/discovery/search-controls.js @@ -57,6 +57,12 @@ mainForm.find('input[name="' + param + '"]').val(value); } + + //DS-3835 ensure that the current scope is passed as form field "scope" + mainForm.find('input[name="current-scope"]') + .val($('select[name="scope"]').val()) + .attr("name","scope"); + //Clear the page param mainForm.find('input[name="page"]').val('1');