diff options
author | silverwind <me@silverwind.io> | 2023-06-22 12:27:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-22 10:27:35 +0000 |
commit | af094fbb6c066ba2e02b812dc3e5875d46e0db42 (patch) | |
tree | f3d45e5337ee8bf8e94730295338f4e42dd614ed /templates/code | |
parent | ff90c87c878b03e7beabac5f19396e0db2c25a1e (diff) | |
download | gitea-af094fbb6c066ba2e02b812dc3e5875d46e0db42.tar.gz gitea-af094fbb6c066ba2e02b812dc3e5875d46e0db42.zip |
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>
Diffstat (limited to 'templates/code')
-rw-r--r-- | templates/code/searchform.tmpl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/templates/code/searchform.tmpl b/templates/code/searchform.tmpl index dfe7bc5b10..822102fc70 100644 --- a/templates/code/searchform.tmpl +++ b/templates/code/searchform.tmpl @@ -1,6 +1,6 @@ <form class="ui form ignore-dirty" style="max-width: 100%"> <div class="ui fluid action input"> - <input name="q" value="{{.Keyword}}"{{if .CodeIndexerUnavailable}} disabled{{end}} placeholder="{{.locale.Tr "explore.search"}}…" autofocus> + {{template "shared/searchinput" dict "locale" .locale "Value" .Keyword "AutoFocus" true "Disabled" .CodeIndexerUnavailable}} <div class="ui dropdown selection {{if .CodeIndexerUnavailable}} disabled{{end}}" data-tooltip-content="{{.locale.Tr "explore.search.type.tooltip"}}"> <input name="t" type="hidden" value="{{.queryType}}"{{if .CodeIndexerUnavailable}} disabled{{end}}>{{svg "octicon-triangle-down" 14 "dropdown icon"}} <div class="text">{{.locale.Tr (printf "explore.search.%s" (or .queryType "fuzzy"))}}</div> |