Skip to content

Delete modal doesn't work on some pages #8301

@kkthxbye-code

Description

@kkthxbye-code

NetBox version

v3.1.6-dev

Python version

3.9

Steps to Reproduce

  1. Create a device
  2. Create interface
  3. View device under the interface tab
  4. Press delete

Expected Behavior

Delete modal pops up

Observed Behavior

Nothing happens.

Cause: #8231

The reason is that some tabs already define the modal block in their template:

{% block modals %}
{% table_config_form table %}
{% endblock modals %}

Changing it to:

{% block modals %}
  {% include 'inc/htmx_modal.html' %}
  {% table_config_form table %}
{% endblock modals %}

fixes the issue. When the tabs templates define the modal, they don't get the default modal defined in generic/object.html

This is an issue in all templates that overwrite the modals block and use the htmx modal.

Examples:

  • dcim/device/interfaces.html
  • dcim/device/frontports.html
  • dcim/device/rearports.html
  • dcim/device/consoleports.html

etc.

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions