Skip to content

Commit d8bf995

Browse files
committed
fix no search button when search_fields is False
1 parent 2dcf122 commit d8bf995

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

adminlteui/templates/admin/search_form.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
{% load i18n static admin_list adminlte_list %}
22

3-
<!--将filter和search合并到一个form中进行处理-->
3+
<!--将filter和search合并到一个form中进行处理-->
44

55
<div id="toolbar">
66
<form id="changelist-search" method="get">
77
{% block filters %}
88
{% if cl.has_filters %}
9-
{% for spec in cl.filter_specs %}{% adminlte_admin_list_filter cl spec %}{% endfor %}
9+
{% for spec in cl.filter_specs %}{% adminlte_admin_list_filter cl spec %}{% endfor %}
1010
{% endif %}
1111
{% endblock %}
1212

1313
{% if cl.search_fields %}
14-
1514
<div class="col-md-2"><!-- DIV needed for valid HTML -->
1615
<div class="form-group">
1716
<input class="form-control" type="text" size="40" name="{{ search_var }}" value="{{ cl.query }}" id="searchbar" autofocus>
1817
</div>
1918
</div>
19+
{% endif %}
20+
2021
<div class="col-md-2">
2122
<div class="form-group" id="search_group">
2223
<button type="submit" class="btn btn-primary">{% trans 'Search' %}</button>
@@ -30,4 +31,3 @@
3031
</div>
3132
</form>
3233
</div>
33-
{% endif %}

0 commit comments

Comments
 (0)