@@ -6,19 +6,37 @@ $(document).ready(function() {
66 });
77 $(document.getElementById($(this).attr("for"))).prop('checked', true);
88 if($('#q').val()) {
9+ if (getHttpRequest() == "GET") {
10+ $('#search_form').attr('action', $('#search_form').serialize());
11+ }
912 $('#search_form').submit();
1013 }
1114 return false;
1215 });
1316 $('#time-range').change(function(e) {
1417 if($('#q').val()) {
18+ if (getHttpRequest() == "GET") {
19+ $('#search_form').attr('action', $('#search_form').serialize());
20+ }
1521 $('#search_form').submit();
1622 }
1723 });
1824 $('#language').change(function(e) {
1925 if($('#q').val()) {
26+ if (getHttpRequest() == "GET") {
27+ $('#search_form').attr('action', $('#search_form').serialize());
28+ }
2029 $('#search_form').submit();
2130 }
2231 });
2332 }
2433});
34+
35+function getHttpRequest() {
36+ httpRequest = "POST";
37+ urlParams = new URLSearchParams(window.location.search);
38+ if (urlParams.has('method')) {
39+ httpRequest = urlParams.get('method');
40+ }
41+ return httpRequest;
42+}