Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
flask-admin
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Python-Dev
flask-admin
Commits
c8dbca84
Commit
c8dbca84
authored
Aug 09, 2020
by
Titanium Hocker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix: search field
parent
a8cc0ec5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
10 deletions
+15
-10
layout.html
flask_admin/templates/bootstrap4/admin/model/layout.html
+14
-9
list.html
flask_admin/templates/bootstrap4/admin/model/list.html
+1
-1
No files found.
flask_admin/templates/bootstrap4/admin/model/layout.html
View file @
c8dbca84
...
@@ -54,7 +54,7 @@
...
@@ -54,7 +54,7 @@
<div
class=
"clearfix"
></div>
<div
class=
"clearfix"
></div>
{% endmacro %}
{% endmacro %}
{% macro search_form(input_class="col-
md-4
") %}
{% macro search_form(input_class="col-
auto
") %}
<form
method=
"GET"
action=
"{{ return_url }}"
class=
"form-inline my-2 my-lg-0"
role=
"search"
>
<form
method=
"GET"
action=
"{{ return_url }}"
class=
"form-inline my-2 my-lg-0"
role=
"search"
>
{% for flt_name, flt_value in filter_args.items() %}
{% for flt_name, flt_value in filter_args.items() %}
<input
type=
"hidden"
name=
"{{ flt_name }}"
value=
"{{ flt_value }}"
>
<input
type=
"hidden"
name=
"{{ flt_name }}"
value=
"{{ flt_value }}"
>
...
@@ -69,18 +69,23 @@
...
@@ -69,18 +69,23 @@
<input
type=
"hidden"
name=
"desc"
value=
"{{ sort_desc }}"
>
<input
type=
"hidden"
name=
"desc"
value=
"{{ sort_desc }}"
>
{% endif %}
{% endif %}
{% if search %}
{% if search %}
<div
class=
"input-group"
>
<div
class=
"
form-inline
input-group"
>
<input
class=
"form-control mr-sm-2
{{ input_class }}"
size=
"30"
type=
"text"
name=
"search"
value=
"{{ search }}"
<input
class=
"form-control
{{ input_class }}"
size=
"30"
type=
"text"
name=
"search"
value=
"{{ search }}"
placeholder=
"{{ _gettext('%(placeholder)s', placeholder=search_placeholder) }}"
>
placeholder=
"{{ _gettext('%(placeholder)s', placeholder=search_placeholder) }}"
>
<a
href=
"{{ clear_search_url }}"
class=
"input-group-addon clear"
><span
<div
class=
"input-group-append"
>
class=
"fa fa-times glyphicon glyphicon-remove"
></span></a>
<span
class=
"input-group-text"
>
<button
class=
"btn btn-secondary my-2 my-sm-0"
type=
"submit"
>
Search
</button>
<a
href=
"{{ clear_search_url }}"
class=
"align-middle"
>
<span
class=
"fa fa-times glyphicon glyphicon-remove"
></span>
</a>
</span>
</div>
<button
class=
"btn btn-secondary my-2 my-sm-0 ml-2"
type=
"submit"
>
{{ _gettext('Search') }}
</button>
</div>
</div>
{% else %}
{% else %}
<div
class=
"form-
group
"
>
<div
class=
"form-
inline
"
>
<input
class=
"form-control mr-sm-2
{{ input_class }}"
size=
"30"
type=
"text"
name=
"search"
value=
""
<input
class=
"form-control
{{ input_class }}"
size=
"30"
type=
"text"
name=
"search"
value=
""
placeholder=
"{{ _gettext('%(placeholder)s', placeholder=search_placeholder) }}"
>
placeholder=
"{{ _gettext('%(placeholder)s', placeholder=search_placeholder) }}"
>
<button
class=
"btn btn-secondary my-2 my-sm-0
"
type=
"submit"
>
Search
</button>
<button
class=
"btn btn-secondary my-2 my-sm-0
ml-2"
type=
"submit"
>
{{ _gettext('Search') }}
</button>
</div>
</div>
{% endif %}
{% endif %}
</form>
</form>
...
...
flask_admin/templates/bootstrap4/admin/model/list.html
View file @
c8dbca84
...
@@ -52,7 +52,7 @@
...
@@ -52,7 +52,7 @@
{% endif %}
{% endif %}
{% if search_supported %}
{% if search_supported %}
<li
class=
"nav-item"
>
<li
class=
"nav-item
col-auto
"
>
{{ model_layout.search_form() }}
{{ model_layout.search_form() }}
</li>
</li>
{% endif %}
{% endif %}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment