1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

#9416: cleanup & widget improvements

This commit is contained in:
jeremystretch
2023-03-22 15:44:01 -04:00
parent a098c3b0c1
commit e176c7d906
10 changed files with 104 additions and 20 deletions

View File

@@ -3,10 +3,11 @@
<form hx-post="{{ form_url }}">
{% csrf_token %}
<div class="modal-header">
<h5 class="modal-title">Widget Configuration</h5>
<h5 class="modal-title">{{ widget_class }} Configuration</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>{{ widget_class.description }}</p>
{% block form %}
{% render_form widget_form %}
{% render_form config_form %}

View File

@@ -1,4 +1,7 @@
<div class="htmx-container"
hx-get="{% url viewname %}"
hx-trigger="load"
></div>
{% if htmx_url %}
<div class="htmx-container" hx-get="{{ htmx_url }}{% if page_size %}?per_page={{ page_size }}{% endif %}" hx-trigger="load"></div>
{% else %}
<div class="text-danger text-center">
<i class="mdi mdi-alert"></i> Unable to load content. Invalid view name: <span class="font-monospace">{{ viewname }}</span>
</div>
{% endif %}