Skip to content

Commit

Permalink
Fix rendering of object deletion warning
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremystretch committed Apr 5, 2024
1 parent aff72b1 commit ef28538
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion netbox/netbox/views/generic/object_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ def get(self, request, *args, **kwargs):
return self._handle_protected_objects(obj, e.restricted_objects, request, e)

# If this is an HTMX request, return only the rendered deletion form as modal content
if request.htmx:
if htmx_partial(request):
viewname = get_viewname(self.queryset.model, action='delete')
form_url = reverse(viewname, kwargs={'pk': obj.pk})
return render(request, 'htmx/delete_form.html', {
Expand Down
2 changes: 1 addition & 1 deletion netbox/templates/generic/object_delete.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
{% block content %}
<div class="modal" tabindex="-1" style="display: block; position: static">
<div class="modal-dialog">
<div class="modal-content" >
<div class="modal-content border-1 border-danger">
{% include 'htmx/delete_form.html' %}
</div>
</div>
Expand Down

0 comments on commit ef28538

Please sign in to comment.