mirror of
https://github.com/netbox-community/netbox.git
synced 2024-05-10 07:54:54 +00:00
19 lines
628 B
HTML
19 lines
628 B
HTML
{% if widget.attrs.selector and not widget.attrs.disabled %}
|
|
<div class="d-flex">
|
|
{% include 'django/forms/widgets/select.html' %}
|
|
<button
|
|
type="button"
|
|
title="Open selector"
|
|
class="btn btn-sm btn-outline-dark border-input ms-1"
|
|
data-bs-toggle="modal"
|
|
data-bs-target="#htmx-modal"
|
|
hx-get="{% url 'htmx_object_selector' %}?_model={{ widget.attrs.selector }}&target={{ widget.attrs.id }}"
|
|
hx-target="#htmx-modal-content"
|
|
>
|
|
<i class="mdi mdi-database-search-outline"></i>
|
|
</button>
|
|
</div>
|
|
{% else %}
|
|
{% include 'django/forms/widgets/select.html' %}
|
|
{% endif %}
|