templates/topbar: add required attribute to search input
If we press enter without any search value, we get directed to /$PROJECT/$VERSION/A/ident/ which is a "400 Bad Request". As the search input is selected by default, this is any enter press where the focus hasn't changed. `required` documentation: https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Attributes/required Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
This commit is contained in:
parent
89aef0d77b
commit
11b6632d5d
1 changed files with 1 additions and 1 deletions
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
<div class="search-controls">
|
<div class="search-controls">
|
||||||
<input placeholder="Search Identifier" type="text" id="search-input" name="i"
|
<input placeholder="Search Identifier" type="text" id="search-input" name="i"
|
||||||
value="{{ searched_ident|default('')|e }}" autofocus/>
|
value="{{ searched_ident|default('')|e }}" autofocus required/>
|
||||||
<button type="button" id="clear-search" class="visible-if-js icon-cross"><span class="screenreader">Clear</span></button>
|
<button type="button" id="clear-search" class="visible-if-js icon-cross"><span class="screenreader">Clear</span></button>
|
||||||
<button type="submit" class="icon-search"><span class="screenreader">Go get it</span></button>
|
<button type="submit" class="icon-search"><span class="screenreader">Go get it</span></button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue