Files
netbox/netbox/templates/ipam/ipaddress_assign.html
bctiemann e7fcbffaf3 Fixes: #16757 - Use table_htmx.html for assigning ipaddresses (#18226)
* Use table_htmx.html for assigning ipaddresses

* Add disable_htmx property on ObjectChildrenView to allow IP assignment flow to avoid htmx fragmentary rendering on object save

* Revert "Add disable_htmx property on ObjectChildrenView to allow IP assignment flow to avoid htmx fragmentary rendering on object save"

This reverts commit fa8f2ac377.
2024-12-17 14:46:52 -05:00

46 lines
1.3 KiB
HTML

{% extends 'generic/object_edit.html' %}
{% load static %}
{% load form_helpers %}
{% load helpers %}
{% load render_table from django_tables2 %}
{% load i18n %}
{% block title %}{% trans "Assign an IP Address" %}{% endblock title %}
{% block tabs %}
{% include 'ipam/inc/ipaddress_edit_header.html' with active_tab='assign' %}
{% endblock %}
{% block form %}
<form action="{% querystring request %}" method="post" class="form form-horizontal">
{% csrf_token %}
{% for field in form.hidden_fields %}
{{ field }}
{% endfor %}
<div class="field-group my-5">
<div class="row">
<h2 class="col-9 offset-3">{% trans "Select IP Address" %}</h2>
</div>
{% render_field form.vrf_id %}
{% render_field form.q %}
</div>
<div class="text-end my-3">
<a href="{{ return_url }}" class="btn btn-outline-secondary">{% trans "Cancel" %}</a>
<button type="submit" class="btn btn-primary">{% trans "Search" %}</button>
</div>
</form>
{% if table %}
<div class="row mb-3">
<div class="col col-md-12">
<h3>{% trans "Search Results" %}</h3>
<div class="table-responsive">
{% render_table table 'inc/table_htmx.html' %}
</div>
</div>
</div>
{% endif %}
{% endblock form %}
{% block buttons %}
{% endblock buttons%}