1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-21 08:31:27 -05:00

Remove autofocus in search box (#28033)

Mentioned here:
https://github.com/go-gitea/gitea/pull/27982#issuecomment-1807923026
This commit is contained in:
yp05327 2023-11-20 17:57:46 +09:00 committed by GitHub
parent 0e1b381ff6
commit eae555ff23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 12 additions and 12 deletions

View file

@ -1,7 +1,7 @@
<div class="ui secondary filter menu gt-ac gt-mx-0">
<form class="ui form ignore-dirty gt-f1">
<div class="ui fluid action input">
{{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}}
{{template "shared/searchinput" dict "Value" .Keyword}}
<button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button>
</div>
</form>

View file

@ -7,7 +7,7 @@
<div class="ui secondary filter menu gt-ac gt-mx-0">
<form class="ui form ignore-dirty gt-f1">
<div class="ui fluid action input">
{{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}}
{{template "shared/searchinput" dict "Value" .Keyword}}
<button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button>
</div>
</form>

View file

@ -14,7 +14,7 @@
<div class="ui attached segment">
<form class="ui form ignore-dirty">
<div class="ui fluid action input">
{{template "shared/searchinput" dict "Value" .Query "AutoFocus" true}}
{{template "shared/searchinput" dict "Value" .Query}}
<select class="ui dropdown" name="type">
<option value="">{{ctx.Locale.Tr "packages.filter.type"}}</option>
<option value="all">{{ctx.Locale.Tr "packages.filter.type.all"}}</option>

View file

@ -1,7 +1,7 @@
<div class="ui secondary filter menu gt-ac gt-mx-0">
<form class="ui form ignore-dirty gt-f1">
<div class="ui fluid action input">
{{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}}
{{template "shared/searchinput" dict "Value" .Keyword}}
<button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button>
</div>
</form>

View file

@ -54,7 +54,7 @@
<!-- Search Text -->
<div class="ui fluid action input">
{{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}}
{{template "shared/searchinput" dict "Value" .Keyword}}
<button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button>
</div>
</form>

View file

@ -1,6 +1,6 @@
<form class="ui form ignore-dirty">
<div class="ui fluid action input">
{{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true "Disabled" .CodeIndexerUnavailable}}
{{template "shared/searchinput" dict "Value" .Keyword "Disabled" .CodeIndexerUnavailable}}
<div class="ui dropdown selection {{if .CodeIndexerUnavailable}} disabled{{end}}" data-tooltip-content="{{ctx.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">{{ctx.Locale.Tr (printf "explore.search.%s" (or .queryType "fuzzy"))}}</div>

View file

@ -3,7 +3,7 @@
<input type="hidden" name="sort" value="{{$.SortType}}">
<input type="hidden" name="language" value="{{$.Language}}">
<div class="ui fluid action input">
{{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" (not .ProfileReadme)}}
{{template "shared/searchinput" dict "Value" .Keyword}}
{{if .PageIsExploreRepositories}}
<input type="hidden" name="only_show_relevant" value="{{.OnlyShowRelevant}}">
{{else if .TabName}}

View file

@ -1,7 +1,7 @@
<div class="ui secondary filter menu gt-ac gt-mx-0">
<form class="ui form ignore-dirty gt-f1">
<div class="ui fluid action input">
{{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}}
{{template "shared/searchinput" dict "Value" .Keyword}}
<button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button>
</div>
</form>

View file

@ -1,7 +1,7 @@
{{template "base/alert" .}}
<form class="ui form ignore-dirty">
<div class="ui fluid action input">
{{template "shared/searchinput" dict "Value" .Query "AutoFocus" true}}
{{template "shared/searchinput" dict "Value" .Query}}
<select class="ui dropdown" name="type">
<option value="">{{ctx.Locale.Tr "packages.filter.type"}}</option>
<option value="all">{{ctx.Locale.Tr "packages.filter.type.all"}}</option>

View file

@ -1,7 +1,7 @@
<p><a href="{{.PackageDescriptor.PackageWebLink}}">{{.PackageDescriptor.Package.Name}}</a> / <strong>{{ctx.Locale.Tr "packages.versions"}}</strong></p>
<form class="ui form ignore-dirty">
<div class="ui fluid action input">
{{template "shared/searchinput" dict "Value" .Query "AutoFocus" true}}
{{template "shared/searchinput" dict "Value" .Query}}
<select class="ui dropdown" name="sort">
<option value="version_asc"{{if eq .Sort "version_asc"}} selected="selected"{{end}}>{{ctx.Locale.Tr "filter.string.asc"}}</option>
<option value="version_desc"{{if eq .Sort "version_desc"}} selected="selected"{{end}}>{{ctx.Locale.Tr "filter.string.desc"}}</option>

View file

@ -35,7 +35,7 @@
<form class="ui form ignore-dirty" id="user-list-search-form" action="{{$.Link}}">
<!-- Search Text -->
<div class="ui fluid action input">
{{template "shared/searchinput" dict "Value" .Keyword "AutoFocus" true}}
{{template "shared/searchinput" dict "Value" .Keyword}}
<button class="ui primary button">{{ctx.Locale.Tr "explore.search"}}</button>
</div>
</form>

View file

@ -1 +1 @@
<input type="search" spellcheck="false" name="q" maxlength="255" placeholder="{{ctx.Locale.Tr "explore.search"}}…"{{if .Value}} value="{{.Value}}"{{end}}{{if .AutoFocus}} autofocus{{end}}{{if .Disabled}} disabled{{end}}>
<input type="search" spellcheck="false" name="q" maxlength="255" placeholder="{{ctx.Locale.Tr "explore.search"}}…"{{if .Value}} value="{{.Value}}"{{end}}{{if .Disabled}} disabled{{end}}>