Skip to content

Commit 68bd37a

Browse files
alehaajeremystretch
authored andcommitted
Add return URL to available IPs table link
As with other buttons to create objects, the 'x IPs available' button in tables now returns to this URL after the IP address has been created.
1 parent 8539686 commit 68bd37a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

netbox/ipam/tables/ip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
{% if record.pk %}
5252
<a href="{{ record.get_absolute_url }}" id="ipaddress_{{ record.pk }}">{{ record.address }}</a>
5353
{% elif perms.ipam.add_ipaddress %}
54-
<a href="{% url 'ipam:ipaddress_add' %}?address={{ record.1 }}{% if object.vrf %}&vrf={{ object.vrf.pk }}{% endif %}{% if object.tenant %}&tenant={{ object.tenant.pk }}{% endif %}" class="btn btn-sm btn-success">{% if record.0 <= 65536 %}{{ record.0 }}{% else %}Many{% endif %} IP{{ record.0|pluralize }} available</a>
54+
<a href="{% url 'ipam:ipaddress_add' %}?address={{ record.1 }}{% if object.vrf %}&vrf={{ object.vrf.pk }}{% endif %}{% if object.tenant %}&tenant={{ object.tenant.pk }}{% endif %}&return_url={% url 'ipam:prefix_ipaddresses' pk=object.pk %}" class="btn btn-sm btn-success">{% if record.0 <= 65536 %}{{ record.0 }}{% else %}Many{% endif %} IP{{ record.0|pluralize }} available</a>
5555
{% else %}
5656
{% if record.0 <= 65536 %}{{ record.0 }}{% else %}Many{% endif %} IP{{ record.0|pluralize }} available
5757
{% endif %}

0 commit comments

Comments
 (0)