forked from forgejo/forgejo
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:
parent
ff90c87c87
commit
af094fbb6c
17 changed files with 24 additions and 23 deletions
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue