mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-04-16 13:01:01 +00:00
Fixed delete button
This commit is contained in:
parent
a0d79fcff1
commit
050a85203e
1 changed files with 4 additions and 2 deletions
|
|
@ -120,11 +120,13 @@ $(function(){
|
|||
});
|
||||
|
||||
$('#upload-list').on('click', '.delete', function(e){
|
||||
var form = $(this);
|
||||
var form = $(this).closest('form');
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
$.post(this.href, form.serialize(), function(data) {
|
||||
var CSRFToken = $('input[name="csrfmiddlewaretoken"]', form).val();
|
||||
|
||||
$.post(this.href, {csrfmiddlewaretoken: CSRFToken}, function(data) {
|
||||
if (data.success) {
|
||||
itemElement.slideUp(function(){$(this).remove()});
|
||||
}else{
|
||||
|
|
|
|||
Loading…
Reference in a new issue