2015-01-20 15:34:37 +01:00
|
|
|
<form class="search-box">
|
2015-01-21 09:55:36 +01:00
|
|
|
<input type="search" placeholder="Search..." value="{{ query }}" data-search-input="{{ base_url_relative }}{{ config.plugins.simplesearch.route}}/query" />
|
|
|
|
<script>
|
|
|
|
jQuery(document).ready(function($){
|
|
|
|
var input = $('[data-search-input]');
|
|
|
|
|
|
|
|
input.on('keypress', function(event) {
|
|
|
|
if (event.which == 13 && input.val().length > 3) {
|
|
|
|
event.preventDefault();
|
2017-04-12 15:06:47 +02:00
|
|
|
window.location.href = input.data('search-input') + '{{ config.system.param_sep }}' + input.val();
|
2015-01-21 09:55:36 +01:00
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
2015-01-20 15:34:37 +01:00
|
|
|
<i class="fa fa-search"></i>
|
|
|
|
</form>
|