aboutsummaryrefslogtreecommitdiffstats
path: root/templates/package
diff options
context:
space:
mode:
authorsilverwind <me@silverwind.io>2023-06-22 12:27:35 +0200
committerGitHub <noreply@github.com>2023-06-22 10:27:35 +0000
commitaf094fbb6c066ba2e02b812dc3e5875d46e0db42 (patch)
treef3d45e5337ee8bf8e94730295338f4e42dd614ed /templates/package
parentff90c87c878b03e7beabac5f19396e0db2c25a1e (diff)
downloadgitea-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/package')
-rw-r--r--templates/package/shared/list.tmpl2
-rw-r--r--templates/package/shared/versionlist.tmpl2
2 files changed, 2 insertions, 2 deletions
diff --git a/templates/package/shared/list.tmpl b/templates/package/shared/list.tmpl
index 5ac5baf0f1..3d14eda3ef 100644
--- a/templates/package/shared/list.tmpl
+++ b/templates/package/shared/list.tmpl
@@ -2,7 +2,7 @@
{{template "base/alert" .}}
<form class="ui form ignore-dirty">
<div class="ui fluid action input">
- <input name="q" value="{{.Query}}" placeholder="{{.locale.Tr "explore.search"}}..." autofocus>
+ {{template "shared/searchinput" dict "locale" .locale "Value" .Query "AutoFocus" true}}
<select class="ui dropdown" name="type">
<option value="">{{.locale.Tr "packages.filter.type"}}</option>
<option value="all">{{.locale.Tr "packages.filter.type.all"}}</option>
diff --git a/templates/package/shared/versionlist.tmpl b/templates/package/shared/versionlist.tmpl
index ba488586a8..23cd0bfcc0 100644
--- a/templates/package/shared/versionlist.tmpl
+++ b/templates/package/shared/versionlist.tmpl
@@ -2,7 +2,7 @@
<p><a href="{{.PackageDescriptor.PackageWebLink}}">{{.PackageDescriptor.Package.Name}}</a> / <strong>{{.locale.Tr "packages.versions"}}</strong></p>
<form class="ui form ignore-dirty">
<div class="ui fluid action input">
- <input name="q" value="{{.Query}}" placeholder="{{.locale.Tr "explore.search"}}..." autofocus>
+ {{template "shared/searchinput" dict "locale" .locale "Value" .Query "AutoFocus" true}}
<select class="ui dropdown" name="sort">
<option value="version_asc"{{if eq .Sort "version_asc"}} selected="selected"{{end}}>{{.locale.Tr "filter.string.asc"}}</option>
<option value="version_desc"{{if eq .Sort "version_desc"}} selected="selected"{{end}}>{{.locale.Tr "filter.string.desc"}}</option>