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
eec1156f
Commit
eec1156f
authored
Sep 17, 2015
by
Tom Christie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
AJAX forms in admin interface
parent
b8ebe298
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
rest_framework/static/rest_framework/js/jquery-1.8.1-min.js
+0
-0
rest_framework/templates/rest_framework/admin.html
+13
-8
No files found.
rest_framework/static/rest_framework/js/jquery-1.8.1-min.js
deleted
100644 → 0
View file @
b8ebe298
This diff is collapsed.
Click to expand it.
rest_framework/templates/rest_framework/admin.html
View file @
eec1156f
...
...
@@ -104,9 +104,7 @@
{% endif %}
{% if delete_form %}
<form
class=
"button-form"
action=
"{{ request.get_full_path }}"
method=
"POST"
>
{% csrf_token %}
<input
type=
"hidden"
name=
"{{ api_settings.FORM_METHOD_OVERRIDE }}"
value=
"DELETE"
/>
<form
class=
"button-form"
action=
"{{ request.get_full_path }}"
data-method=
"DELETE"
>
<button
class=
"btn btn-danger"
>
<span
class=
"glyphicon glyphicon-remove"
aria-hidden=
"true"
></span>
Delete
</button>
...
...
@@ -180,7 +178,7 @@
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
><span
aria-hidden=
"true"
>
×
</span></button>
<h4
class=
"modal-title"
id=
"myModalLabel"
>
Edit
</h4>
</div>
<form
action=
"{{ request.get_full_path }}"
method=
"POS
T"
enctype=
"multipart/form-data"
class=
"form-horizontal"
novalidate
>
<form
action=
"{{ request.get_full_path }}"
data-method=
"PU
T"
enctype=
"multipart/form-data"
class=
"form-horizontal"
novalidate
>
<div
class=
"modal-body"
>
<fieldset>
{{ put_form }}
...
...
@@ -188,7 +186,7 @@
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
Close
</button>
<button
name=
"{{ api_settings.FORM_METHOD_OVERRIDE }}"
value=
"PUT"
type=
"submit"
class=
"btn btn-primary"
>
Save
</button>
<button
type=
"submit"
class=
"btn btn-primary"
>
Save
</button>
</div>
</form>
</div>
...
...
@@ -204,7 +202,7 @@
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-label=
"Close"
><span
aria-hidden=
"true"
>
×
</span></button>
<h4
class=
"modal-title"
id=
"myModalLabel"
>
{{ error_title }}
</h4>
</div>
<form
action=
"{{ request.get_full_path }}"
method=
"POST
"
enctype=
"multipart/form-data"
class=
"form-horizontal"
novalidate
>
<form
action=
"{{ request.get_full_path }}"
data-method=
"{{ request.method }}
"
enctype=
"multipart/form-data"
class=
"form-horizontal"
novalidate
>
<div
class=
"modal-body"
>
<fieldset>
{{ error_form }}
...
...
@@ -212,7 +210,7 @@
</div>
<div
class=
"modal-footer"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
Close
</button>
<button
name=
"{{ api_settings.FORM_METHOD_OVERRIDE }}"
value=
"{{ request.method }}"
type=
"submit"
class=
"btn btn-primary"
>
Save
</button>
<button
type=
"submit"
class=
"btn btn-primary"
>
Save
</button>
</div>
</form>
</div>
...
...
@@ -221,10 +219,17 @@
{% endif %}
{% block script %}
<script
src=
"{% static "
rest_framework
/
js
/
jquery-1
.
8
.
1-min
.
js
"
%}"
></script>
<script
src=
"{% static "
rest_framework
/
js
/
jquery-1
.
11
.
3-min
.
js
"
%}"
></script>
<script
src=
"{% static "
rest_framework
/
js
/
ajax-form
.
js
"
%}"
></script>
<script
src=
"{% static "
rest_framework
/
js
/
csrf
.
js
"
%}"
></script>
<script
src=
"{% static "
rest_framework
/
js
/
bootstrap
.
min
.
js
"
%}"
></script>
<script
src=
"{% static "
rest_framework
/
js
/
prettify-min
.
js
"
%}"
></script>
<script
src=
"{% static "
rest_framework
/
js
/
default
.
js
"
%}"
></script>
<script>
$
(
document
).
ready
(
function
()
{
$
(
'form'
).
ajaxForm
();
});
</script>
{% endblock %}
</body>
{% endblock %}
...
...
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