Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
django-rest-framework
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
django-rest-framework
Commits
d2f90fd6
Commit
d2f90fd6
authored
Dec 01, 2015
by
José Padilla
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3662 from awwester/ticket_3228
#3228 - add confirm modal for delete
parents
832d6322
6d1ed851
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
1 deletions
+22
-1
rest_framework/static/rest_framework/css/bootstrap-tweaks.css
+5
-0
rest_framework/templates/rest_framework/base.html
+17
-1
No files found.
rest_framework/static/rest_framework/css/bootstrap-tweaks.css
View file @
d2f90fd6
...
...
@@ -227,3 +227,8 @@ body a:hover {
width
:
20px
;
margin-top
:
3px
;
}
.modal-footer
form
{
margin-left
:
5px
;
margin-right
:
5px
;
}
rest_framework/templates/rest_framework/base.html
View file @
d2f90fd6
{% load staticfiles %}
{% load rest_framework %}
{% load i18n %}
<!DOCTYPE html>
<html>
<head>
...
...
@@ -101,9 +102,24 @@
{% endif %}
{% if delete_form %}
<button
class=
"btn btn-danger button-form js-tooltip"
title=
"Make a DELETE request on the {{ name }} resource"
data-toggle=
"modal"
data-target=
"#deleteModal"
>
DELETE
</button>
<!-- Delete Modal -->
<div
class=
"modal fade"
id=
"deleteModal"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog"
>
<div
class=
"modal-content"
>
<div
class=
"modal-body"
>
<h4
class=
"text-center"
>
Are you sure you want to delete this {{ name }}?
</h4>
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
Cancel
</button>
<form
class=
"button-form"
action=
"{{ request.get_full_path }}"
data-method=
"DELETE"
>
<button
class=
"btn btn-danger js-tooltip"
title=
"Make a DELETE request on the {{ name }} resource"
>
DELETE
</button>
<button
class=
"btn btn-danger"
>
Delete
</button>
</form>
</div>
</div>
</div>
</div>
{% endif %}
{% if filter_form %}
...
...
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