mirror of
https://github.com/netbox-community/netbox.git
synced 2026-01-10 22:02:17 -06:00
The select list of 'Images and Label', 'Images Only', and 'Label Only' was broken during recent work while implementing #19823. This fixes the issue by placing the `rack_elevation` class attribute on the <div> element that contains the SVG after being loaded by HTMX. In addition, we needed to slightly modify the selectors in the frontend code that looked for the elements within the SVG to hide and/or show. Previously, it was looking inside of a contentDocument embedded in an <object> element. The simplified version just looks inside of the SVG containing div.
21 lines
878 B
HTML
21 lines
878 B
HTML
{% load i18n %}
|
|
<div style="margin-left: -30px" class="rack_elevation">
|
|
<div
|
|
hx-get="{% url 'dcim-api:rack-elevation' pk=object.pk %}?face={{ face }}&render=svg{% if extra_params %}&{{ extra_params }}{% endif %}"
|
|
hx-trigger="intersect"
|
|
hx-swap="outerHTML"
|
|
aria-label="{% trans "Rack elevation" %}"
|
|
>
|
|
<div class="d-flex justify-content-center align-items-center rack-loading-container">
|
|
<div class="spinner-border" role="status">
|
|
<span class="visually-hidden">{% trans "Loading..." %}</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="text-center mt-3">
|
|
<a class="btn btn-outline-primary" href="{% url 'dcim-api:rack-elevation' pk=object.pk %}?face={{face}}&render=svg{% if extra_params %}&{{ extra_params }}{% endif %}" hx-boost="false">
|
|
<i class="mdi mdi-file-download"></i> {% trans "Download SVG" %}
|
|
</a>
|
|
</div>
|