Skip to content

Commit

Permalink
confirmation alert before deleting
Browse files Browse the repository at this point in the history
  • Loading branch information
csae8092 committed Dec 12, 2023
1 parent d87e2a8 commit 9ce201a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
class="btn btn-danger"
hx-get="/apis/relations/delete/{{ record.pk }}/"
hx-target="closest tr" hx-swap="outerHTML swap:1s"
hx-confirm="Sicher, weil was weg ist ist weg"
>
<i class="bi bi-trash"></i>
</button>
2 changes: 1 addition & 1 deletion apis_core/apis_relations/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,4 +248,4 @@ def save_ajax_form(request, entity_type, kind_form, SiteID, ObjectID=False):
def delete_relation_view(request, relation_id):
instance = TempEntityClass.objects.get(id=relation_id)
instance.delete()
return HttpResponse(instance.id)
return HttpResponse(f"<small>gelöschte Verbindung: {relation_id}</small> ")

0 comments on commit 9ce201a

Please sign in to comment.