mirror of
https://github.com/Nebucatnetzer/network_inventory.git
synced 2024-06-30 05:01:05 +02:00
correct htmx target ids
This commit is contained in:
parent
b8a130ec10
commit
b118e07d5c
|
@ -1,5 +1,5 @@
|
||||||
{% if valid %}
|
{% if valid %}
|
||||||
<div hx-swap-oob="true:#div_id_location">{{ form }}</div>
|
<div hx-swap-oob="true:#htmx-location-target">{{ form }}</div>
|
||||||
<div id="htmx-modal-position" hx-swap-oob="true"></div>
|
<div id="htmx-modal-position" hx-swap-oob="true"></div>
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ form }}
|
{{ form }}
|
||||||
|
|
|
@ -80,17 +80,17 @@ class DeviceUpdateForm(forms.ModelForm):
|
||||||
self.helper.layout = Layout(
|
self.helper.layout = Layout(
|
||||||
'name',
|
'name',
|
||||||
'customer',
|
'customer',
|
||||||
Div(Field('location'),
|
Div('location',
|
||||||
HTML("""
|
HTML("""
|
||||||
<a hx-get="{% url 'htmx_create_location' %}" hx-swap="innerHTML" hx-target="#htmx-modal-position" href="" class="add" title="Add" data-toggle="tooltip"><i class="material-icons">add</i></a>
|
<a hx-get="{% url 'htmx_create_location' %}" hx-swap="innerHTML" hx-target="#htmx-modal-position" href="" class="add" title="Add" data-toggle="tooltip"><i class="material-icons">add</i></a>
|
||||||
"""),
|
"""),
|
||||||
css_class="input-group"),
|
css_class="input-group", id="htmx-location-target"),
|
||||||
'user',
|
'user',
|
||||||
Div(Field('category'),
|
Div(Field('category'),
|
||||||
HTML("""
|
HTML("""
|
||||||
<a hx-get="{% url 'device_category_create' %}" hx-swap="innerHTML" hx-target="#htmx-modal-position" href="" class="add" title="Add" data-toggle="tooltip"><i class="material-icons">add</i></a>
|
<a hx-get="{% url 'device_category_create' %}" hx-swap="innerHTML" hx-target="#htmx-modal-position" href="" class="add" title="Add" data-toggle="tooltip"><i class="material-icons">add</i></a>
|
||||||
"""),
|
"""),
|
||||||
css_class="input-group"),
|
css_class="input-group", id="htmx-category-target"),
|
||||||
'serialnumber',
|
'serialnumber',
|
||||||
'description',
|
'description',
|
||||||
FormActions(
|
FormActions(
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
{% if valid %}
|
{% if valid %}
|
||||||
<div hx-swap-oob="true:#div_id_category">{{ form }}</div>
|
<div hx-swap-oob="true:#htmx-category-target">{{ form }}</div>
|
||||||
<div id="htmx-modal-position" hx-swap-oob="true"></div>
|
<div id="htmx-modal-position" hx-swap-oob="true"></div>
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ form }}
|
{{ form }}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user