Skip to content

Commit

Permalink
Added autofocus and query value in html form
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinMikita committed Mar 10, 2016
1 parent 75f4dda commit cc1fb30
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion web/templates/custom.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% block title %}- Custom search{% endblock %}
{% block search_input %}
<form name="custom" action="/custom" method="get">
Search: <input autocomplete="false" id="autocomplete" type="text" name="q" value="{{query}}" class="autocomplete-nominatim" onchange="this.form.submit()" /> in <select name="index" onchange="this.form.submit()">
Search: <input autocomplete="off" id="autocomplete" type="text" name="q" value="{{query}}" class="autocomplete-nominatim" onchange="this.form.submit()" autofocus="autofocus" /> in <select name="index" onchange="this.form.submit()">
{% for opt in indices %}
{% set selected=" selected=\"selected\"" if (index == opt) else "" %}
<option value="{{opt}}"{{selected}}>{{opt}}</option>
Expand Down
2 changes: 1 addition & 1 deletion web/templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<h1>OSM Names full text search</h1>
{% block search_input %}
<form name="display_name" action="{{ route }}" method="get">
Search: <input autocomplete="off" id="autocomplete" type="text" name="q" value="" class="autocomplete-nominatim" /><br/>
Search: <input autocomplete="off" id="autocomplete" type="text" name="q" value="{{query}}" class="autocomplete-nominatim" autofocus="autofocus" /><br/>
<input type="hidden" name="format" value="html" />
<input class="btn" type="submit" value="Search" />
</form>
Expand Down

0 comments on commit cc1fb30

Please sign in to comment.