mirror of
https://github.com/go-gitea/gitea.git
synced 2025-06-02 10:44:47 +02:00
Placeholder default for SearchInput
This commit is contained in:
parent
a9d2b28ce5
commit
0e0429ba69
@ -15,7 +15,7 @@ func SearchCombo(locale translation.Locale, value, placeholder string) g.Node {
|
||||
disabled := false
|
||||
return gh.Div(
|
||||
gh.Class("ui small fluid action input"),
|
||||
SearchInput(value, placeholder, disabled),
|
||||
SearchInput(locale, value, placeholder, disabled),
|
||||
// TODO SearchModeDropdown
|
||||
SearchButton(disabled, ""),
|
||||
)
|
||||
|
@ -4,13 +4,18 @@
|
||||
package components
|
||||
|
||||
import (
|
||||
"code.gitea.io/gitea/modules/translation"
|
||||
g "maragu.dev/gomponents"
|
||||
gh "maragu.dev/gomponents/html"
|
||||
)
|
||||
|
||||
func SearchInput(value, placeholder string, disabled bool) g.Node {
|
||||
func SearchInput(locale translation.Locale, value, placeholder string, disabled bool) g.Node {
|
||||
// Corresponds to templates/shared/search/input.tmpl
|
||||
|
||||
if placeholder == "" {
|
||||
placeholder = string(locale.Tr("search.search"))
|
||||
}
|
||||
|
||||
return gh.Input(
|
||||
gh.Type("search"),
|
||||
gh.Name("q"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user