mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Introduce shared template for search inputs (#25338)
- Set [type=search](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/search) - Disable spellcheck - Set maxLength 255 that I found in `templates/repo/issue/search.tmpl` - Remove unnecessary `max-width`, it does nothing --------- Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
This commit is contained in:
@@ -35,8 +35,8 @@
|
||||
<div class="ui attached segment">
|
||||
<form class="ui form ignore-dirty" id="user-list-search-form" action="{{$.Link}}">
|
||||
<!-- Search Text -->
|
||||
<div class="ui fluid action input" style="max-width: 70%;">
|
||||
<input name="q" value="{{.Keyword}}" placeholder="{{.locale.Tr "explore.search"}}..." autofocus>
|
||||
<div class="ui fluid action input">
|
||||
{{template "shared/searchinput" dict "locale" .locale "Value" .Keyword "AutoFocus" true}}
|
||||
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
|
1
templates/shared/searchinput.tmpl
Normal file
1
templates/shared/searchinput.tmpl
Normal file
@@ -0,0 +1 @@
|
||||
<input type="search" spellcheck="false" name="q" maxlength="255" placeholder="{{.locale.Tr "explore.search"}}…"{{if .Value}} value="{{.Value}}"{{end}}{{if .AutoFocus}} autofocus{{end}}{{if .Disabled}} disabled{{end}}>
|
Reference in New Issue
Block a user