Fix search bad text bug

This commit is contained in:
rubenwardy 2022-01-07 21:15:48 +00:00
parent a175162186
commit ad05ba1ee8
2 changed files with 2 additions and 2 deletions

View File

@ -99,7 +99,7 @@ def list_all():
selected_tags = set(qb.tags)
return render_template("packages/list.html",
title=title, packages=query.items, pagination=query,
query_hint=title, packages=query.items, pagination=query,
query=search, tags=tags, selected_tags=selected_tags, type=type_name,
authors=authors, packages_count=query.total, topics=topics)

View File

@ -45,7 +45,7 @@
<form class="form-inline my-2 my-lg-0" method="GET" action="/packages/">
{% if type %}<input type="hidden" name="type" value="{{ type }}" />{% endif %}
<input class="form-control" name="q" type="text"
placeholder="{{ _('Search %(type)s', type=title | lower or 'all packages') }}"
placeholder="{% if query_hint %}{{ _('Search %(type)s', type=query_hint | lower) }}{% else %}{{ _('Search all packages') }}{% endif %}
value="{{ query or ''}}">
<input class="btn btn-secondary my-2 my-sm-0 mr-sm-2" type="submit" value="{{ _('Search') }}" />
<!-- <input class="btn btn-secondary my-2 my-sm-0"