mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-26 09:16:10 -06:00
Avoid overlap with filterset field names
This commit is contained in:
parent
e04c62ada3
commit
ce1ef8aa70
@ -10,7 +10,7 @@ class ObjectSelectorView(View):
|
||||
template_name = 'htmx/object_selector.html'
|
||||
|
||||
def get(self, request):
|
||||
model = self._get_model(request.GET.get('model', ''))
|
||||
model = self._get_model(request.GET.get('_model', ''))
|
||||
|
||||
form_class = self._get_form_class(model)
|
||||
form = form_class(request.GET)
|
||||
|
@ -15,7 +15,7 @@
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-9">
|
||||
<form hx-get="{% url 'htmx_object_selector' %}?model={{ model|meta:"label_lower" }}" hx-target="#selector_results">
|
||||
<form hx-get="{% url 'htmx_object_selector' %}?_model={{ model|meta:"label_lower" }}" hx-target="#selector_results">
|
||||
<div class="tab-content p-1">
|
||||
{% for field in form.visible_fields %}
|
||||
<div class="collapse{% if forloop.first %} show{% endif %}" id="selector{{ forloop.counter }}">{% render_field field %}</div>
|
||||
|
@ -7,7 +7,7 @@
|
||||
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-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>
|
||||
|
Loading…
Reference in New Issue
Block a user