mirror of
https://github.com/netbox-community/netbox.git
synced 2026-02-03 22:06:26 -06:00
fix(ipam): Add scope fields to "Add Prefix" button
Update the "Add Prefix" button URL in the child prefixes view to pass `scope_type` and `scope` (replacing the legacy `site` query parameter). This allows the prefix creation form to inherit the parent prefix scope and scope type as expected. Fixes #21262
This commit is contained in:
@@ -6,7 +6,7 @@
|
|||||||
{% include 'ipam/inc/max_depth.html' %}
|
{% include 'ipam/inc/max_depth.html' %}
|
||||||
{% include 'ipam/inc/max_length.html' %}
|
{% include 'ipam/inc/max_length.html' %}
|
||||||
{% if perms.ipam.add_prefix and first_available_prefix %}
|
{% if perms.ipam.add_prefix and first_available_prefix %}
|
||||||
<a href="{% url 'ipam:prefix_add' %}?prefix={{ first_available_prefix }}&vrf={{ object.vrf.pk }}&site={{ object.site.pk }}&tenant_group={{ object.tenant.group.pk }}&tenant={{ object.tenant.pk }}" class="btn btn-primary">
|
<a href="{% url 'ipam:prefix_add' %}?prefix={{ first_available_prefix }}&vrf={{ object.vrf.pk }}&scope_type={{ object.scope_type.pk }}&scope={{ object.scope.pk }}&tenant_group={{ object.tenant.group.pk }}&tenant={{ object.tenant.pk }}" class="btn btn-primary">
|
||||||
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add Prefix" %}
|
<i class="mdi mdi-plus-thick" aria-hidden="true"></i> {% trans "Add Prefix" %}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user