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
5d97b8ee
Unverified
Commit
5d97b8ee
authored
Jan 13, 2019
by
ufo911
Committed by
GitHub
Jan 13, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix csrf token for dir delete
parent
75221862
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
4 deletions
+12
-4
list.html
flask_admin/templates/bootstrap2/admin/file/list.html
+12
-4
No files found.
flask_admin/templates/bootstrap2/admin/file/list.html
View file @
5d97b8ee
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
<th>
<th>
{% if admin_view.is_column_sortable(column) %}
{% if admin_view.is_column_sortable(column) %}
{% if sort_column == column %}
{% if sort_column == column %}
<a
href=
"{{ sort_url(column, True) }}"
title=
"{{ _gettext('Sort by %(name)s', name=column) }}"
>
<a
href=
"{{ sort_url(column,
dir_path,
True) }}"
title=
"{{ _gettext('Sort by %(name)s', name=column) }}"
>
{{ admin_view.column_label(column) }}
{{ admin_view.column_label(column) }}
{% if sort_desc %}
{% if sort_desc %}
<i
class=
"fa fa-chevron-up icon-chevron-up"
></i>
<i
class=
"fa fa-chevron-up icon-chevron-up"
></i>
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
{% endif %}
{% endif %}
</a>
</a>
{% else %}
{% else %}
<a
href=
"{{ sort_url(column) }}"
title=
"{{ _gettext('Sort by %(name)s', name=column) }}"
>
{{ admin_view.column_label(column) }}
</a>
<a
href=
"{{ sort_url(column
, dir_path
) }}"
title=
"{{ _gettext('Sort by %(name)s', name=column) }}"
>
{{ admin_view.column_label(column) }}
</a>
{% endif %}
{% endif %}
{% else %}
{% else %}
{{ _gettext(admin_view.column_label(column)) }}
{{ _gettext(admin_view.column_label(column)) }}
...
@@ -84,7 +84,11 @@
...
@@ -84,7 +84,11 @@
{% if name != '..' and admin_view.can_delete_dirs %}
{% if name != '..' and admin_view.can_delete_dirs %}
<form
class=
"icon"
method=
"POST"
action=
"{{ get_url('.delete') }}"
>
<form
class=
"icon"
method=
"POST"
action=
"{{ get_url('.delete') }}"
>
{{ delete_form.path(value=path) }}
{{ delete_form.path(value=path) }}
{{ delete_form.csrf_token }}
{% if delete_form.csrf_token %}
{{ delete_form.csrf_token }}
{% elif csrf_token %}
<input
type=
"hidden"
name=
"csrf_token"
value=
"{{ csrf_token() }}"
/>
{% endif %}
<button
onclick=
"return confirm('{{ _gettext('Are you sure you want to delete \\\'%(name)s\\\' recursively?', name=name) }}')"
>
<button
onclick=
"return confirm('{{ _gettext('Are you sure you want to delete \\\'%(name)s\\\' recursively?', name=name) }}')"
>
<i
class=
"fa fa-times icon-remove"
></i>
<i
class=
"fa fa-times icon-remove"
></i>
</button>
</button>
...
@@ -93,7 +97,11 @@
...
@@ -93,7 +97,11 @@
{% else %}
{% else %}
<form
class=
"icon"
method=
"POST"
action=
"{{ get_url('.delete') }}"
>
<form
class=
"icon"
method=
"POST"
action=
"{{ get_url('.delete') }}"
>
{{ delete_form.path(value=path) }}
{{ delete_form.path(value=path) }}
{{ delete_form.csrf_token }}
{% if delete_form.csrf_token %}
{{ delete_form.csrf_token }}
{% elif csrf_token %}
<input
type=
"hidden"
name=
"csrf_token"
value=
"{{ csrf_token() }}"
/>
{% endif %}
<button
onclick=
"return confirm('{{ _gettext('Are you sure you want to delete \\\'%(name)s\\\'?', name=name) }}')"
>
<button
onclick=
"return confirm('{{ _gettext('Are you sure you want to delete \\\'%(name)s\\\'?', name=name) }}')"
>
<i
class=
"fa fa-times icon-remove"
></i>
<i
class=
"fa fa-times icon-remove"
></i>
</button>
</button>
...
...
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