PHRAS-2779 #comment fix delete application on account #time 4h

This commit is contained in:
Harrys Ravalomanana
2020-02-18 16:30:53 +04:00
parent 579ba471c4
commit b5f1fd18f4
2 changed files with 34 additions and 9 deletions

View File

@@ -66,4 +66,25 @@
</div>
</div>
</div>
<script>
$('a.delete-app').bind('click', function (e) {
e.preventDefault();
var $this = $(this);
var li = $this.closest('li');
$.ajax({
type: 'DELETE',
url: $this.attr('href'),
dataType: 'json',
data: {},
success: function success(data) {
if (data.success) {
li.find('.modal').modal('hide');
li.remove();
}
}
});
});
</script>
{% endblock %}