mirror of
https://github.com/searxng/searxng.git
synced 2024-11-20 03:10:10 +01:00
automatic search when language is selected
This commit is contained in:
parent
c677aee58a
commit
a11230819f
@ -15,5 +15,10 @@ $(document).ready(function() {
|
|||||||
$('#search_form').submit();
|
$('#search_form').submit();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
$('#language').change(function(e) {
|
||||||
|
if($('#q').val()) {
|
||||||
|
$('#search_form').submit();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{% if preferences %}
|
{% if preferences %}
|
||||||
<select class="form-control" name='language'>
|
<select class="form-control" name='language'>
|
||||||
{% else %}
|
{% else %}
|
||||||
<select class="time_range" name='language'>
|
<select class="time_range" id='language' name='language'>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Default language') }}</option>
|
<option value="all" {% if current_language == 'all' %}selected="selected"{% endif %}>{{ _('Default language') }}</option>
|
||||||
{% for lang_id,lang_name,country_name,english_name in language_codes | sort(attribute=1) %}
|
{% for lang_id,lang_name,country_name,english_name in language_codes | sort(attribute=1) %}
|
||||||
|
Loading…
Reference in New Issue
Block a user