aboutsummaryrefslogtreecommitdiffstats
path: root/templates/admin
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/admin
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/admin')
-rw-r--r--templates/admin/base/search.tmpl4
-rw-r--r--templates/admin/emails/list.tmpl4
-rw-r--r--templates/admin/packages/list.tmpl2
-rw-r--r--templates/admin/repo/search.tmpl4
-rw-r--r--templates/admin/user/list.tmpl4
5 files changed, 9 insertions, 9 deletions
diff --git a/templates/admin/base/search.tmpl b/templates/admin/base/search.tmpl
index ae1a4d2ac5..bc684e7657 100644
--- a/templates/admin/base/search.tmpl
+++ b/templates/admin/base/search.tmpl
@@ -15,9 +15,9 @@
</div>
</div>
</div>
-<form class="ui form ignore-dirty" style="max-width: 90%;">
+<form class="ui form ignore-dirty">
<div class="ui fluid action input">
- <input name="q" value="{{.Keyword}}" placeholder="{{.locale.Tr "explore.search"}}..." autofocus>
+ {{template "shared/searchinput" dict "locale" .locale "Value" .Keyword "AutoFocus" true}}
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
</div>
</form>
diff --git a/templates/admin/emails/list.tmpl b/templates/admin/emails/list.tmpl
index 1da40cbf29..db15887d98 100644
--- a/templates/admin/emails/list.tmpl
+++ b/templates/admin/emails/list.tmpl
@@ -19,9 +19,9 @@
</div>
</div>
</div>
- <form class="ui form ignore-dirty" style="max-width: 90%">
+ <form class="ui form ignore-dirty">
<div class="ui fluid action input">
- <input name="q" value="{{.Keyword}}" placeholder="{{.locale.Tr "explore.search"}}..." autofocus>
+ {{template "shared/searchinput" dict "locale" .locale "Value" .Keyword "AutoFocus" true}}
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
</div>
</form>
diff --git a/templates/admin/packages/list.tmpl b/templates/admin/packages/list.tmpl
index f320878b80..a0b6fd9bb0 100644
--- a/templates/admin/packages/list.tmpl
+++ b/templates/admin/packages/list.tmpl
@@ -8,7 +8,7 @@
<div class="ui attached segment">
<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/admin/repo/search.tmpl b/templates/admin/repo/search.tmpl
index 15aa31b32b..cb9aad1a66 100644
--- a/templates/admin/repo/search.tmpl
+++ b/templates/admin/repo/search.tmpl
@@ -21,9 +21,9 @@
</div>
</div>
</div>
-<form class="ui form ignore-dirty" style="max-width: 90%">
+<form class="ui form ignore-dirty">
<div class="ui fluid action input">
- <input name="q" value="{{.Keyword}}" placeholder="{{.locale.Tr "explore.search"}}..." autofocus>
+ {{template "shared/searchinput" dict "locale" .locale "Value" .Keyword "AutoFocus" true}}
<button class="ui primary button">{{.locale.Tr "explore.search"}}</button>
</div>
</form>
diff --git a/templates/admin/user/list.tmpl b/templates/admin/user/list.tmpl
index 2f76f2d3ba..3093b0f47a 100644
--- a/templates/admin/user/list.tmpl
+++ b/templates/admin/user/list.tmpl
@@ -51,8 +51,8 @@
</div>
<!-- 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>