Skip to content

Commit 4dd2233

Browse files
committed
Fixes language-specific search page issue (#2087)
Signed-off-by: Chris Abraham <[email protected]>
1 parent 314e744 commit 4dd2233

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

assets/js/search.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ limitations under the License.
2727
}
2828

2929
var query = $(this).val();
30-
var searchPage = "{{ "search/" | relLangURL }}?q=" + query;
31-
console.log(searchPage);
30+
var searchPage = $(this).data('search-page') + "?q=" + query;
3231
document.location = searchPage;
3332

3433
return false;

layouts/partials/search-input.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<div class="add-search-icon">
2-
<input type="search" class="form-control td-search-input" placeholder="{{ T "ui_search" }}" aria-label="{{ T "ui_search" }}" autocomplete="off">
2+
<input type="search" data-search-page="{{ "search/" | relLangURL }}" class="form-control td-search-input" placeholder="{{ T "ui_search" }}" aria-label="{{ T "ui_search" }}" autocomplete="off">
33
<svg xmlns="http://www.w3.org/2000/svg" role="img" viewBox="0.88 0.63 32.17 30.24"><g opacity=".945"><path stroke="#000" stroke-width="4.392" d="M13.746 23.279c5.536 0 10.024-4.432 10.024-9.9 0-5.466-4.488-9.898-10.024-9.898-5.536 0-10.024 4.432-10.024 9.899 0 5.467 4.488 9.899 10.024 9.899zm6.56-5.069l10.652 10.52" fill="transparent" /></g></svg>
44
</div>

0 commit comments

Comments
 (0)