Skip to content

Commit

Permalink
Fix value of desc param in filter form (1 instead of "True")
Browse files Browse the repository at this point in the history
Fixes #1761
  • Loading branch information
ibushong committed Jun 26, 2022
1 parent 1df60d8 commit 6535df8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions flask_admin/templates/bootstrap2/admin/model/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<input type="hidden" name="sort" value="{{ sort_column }}">
{% endif %}
{% if sort_desc %}
<input type="hidden" name="desc" value="{{ sort_desc }}">
<input type="hidden" name="desc" value="1">
{% endif %}
{% if search %}
<input type="hidden" name="search" value="{{ search }}">
Expand Down Expand Up @@ -76,7 +76,7 @@
<input type="hidden" name="sort" value="{{ sort_column }}">
{% endif %}
{% if sort_desc %}
<input type="hidden" name="desc" value="{{ sort_desc }}">
<input type="hidden" name="desc" value="1">
{% endif %}
{%- set full_search_placeholder = _gettext('Search') %}
{%- if search_placeholder %}{% set full_search_placeholder = [full_search_placeholder, search_placeholder] | join(": ") %}{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions flask_admin/templates/bootstrap3/admin/model/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<input type="hidden" name="sort" value="{{ sort_column }}">
{% endif %}
{% if sort_desc %}
<input type="hidden" name="desc" value="{{ sort_desc }}">
<input type="hidden" name="desc" value="1">
{% endif %}
{% if search %}
<input type="hidden" name="search" value="{{ search }}">
Expand Down Expand Up @@ -76,7 +76,7 @@
<input type="hidden" name="sort" value="{{ sort_column }}">
{% endif %}
{% if sort_desc %}
<input type="hidden" name="desc" value="{{ sort_desc }}">
<input type="hidden" name="desc" value="1">
{% endif %}
{%- set full_search_placeholder = _gettext('Search') %}
{%- set max_size = config.get('FLASK_ADMIN_SEARCH_SIZE_MAX', 100) %}
Expand Down
4 changes: 2 additions & 2 deletions flask_admin/templates/bootstrap4/admin/model/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<input type="hidden" name="sort" value="{{ sort_column }}">
{% endif %}
{% if sort_desc %}
<input type="hidden" name="desc" value="{{ sort_desc }}">
<input type="hidden" name="desc" value="1">
{% endif %}
{% if search %}
<input type="hidden" name="search" value="{{ search }}">
Expand Down Expand Up @@ -69,7 +69,7 @@
<input type="hidden" name="sort" value="{{ sort_column }}">
{% endif %}
{% if sort_desc %}
<input type="hidden" name="desc" value="{{ sort_desc }}">
<input type="hidden" name="desc" value="1">
{% endif %}
{% if search %}
<div class="form-inline input-group">
Expand Down

0 comments on commit 6535df8

Please sign in to comment.