Skip to content

Commit

Permalink
Fixes netbox-community#718: Restore is_primary field on IP assignment…
Browse files Browse the repository at this point in the history
… form
  • Loading branch information
jeremystretch committed Dec 1, 2016
1 parent fa25ae8 commit de87c16
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
3 changes: 2 additions & 1 deletion netbox/templates/dcim/ipaddress_assign.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends '_base.html' %}
{% load form_helpers %}

{% block title %}Assign an IP Address{% endblock %}
{% block title %}Assign a New IP Address{% endblock %}

{% block content %}
<form action="." method="post" class="form form-horizontal">
Expand Down Expand Up @@ -40,6 +40,7 @@
</div>
</div>
{% render_field form.interface %}
{% render_field form.set_as_primary %}
</div>
</div>
<div class="panel panel-default">
Expand Down
20 changes: 18 additions & 2 deletions netbox/templates/ipam/ipaddress_assign.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% load static from staticfiles %}
{% load form_helpers %}

{% block title %}Assign IP Address{% endblock %}
{% block title %}Assign an IP Address{% endblock %}

{% block content %}
<form action="." method="post" class="form form-horizontal">
Expand All @@ -19,9 +19,25 @@
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
<strong>Assign IP Address {{ ipaddress }} ({% if ipaddress.vrf %}VRF {{ ipaddress.vrf }}{% else %}Global Table{% endif %})</strong>
<strong>Assign an IP Address</strong>
</div>
<div class="panel-body">
<div class="form-group">
<label class="col-md-3 control-label">IP Address</label>
<div class="col-md-9">
<p class="form-control-static">{{ ipaddress }}</p>
</div>
<label class="col-md-3 control-label">VRF</label>
<div class="col-md-9">
<p class="form-control-static">
{% if ipaddress.vrf %}
<a href="{% url 'ipam:vrf' pk=ipaddress.vrf.pk %}">{{ ipaddress.vrf }}</a> ({{ ipaddress.vrf.rd }})
{% else %}
<span>Global</span>
{% endif %}
</p>
</div>
</div>
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="active"><a href="#search" aria-controls="search" role="tab" data-toggle="tab">Search</a></li>
<li role="presentation"><a href="#select" aria-controls="home" role="tab" data-toggle="tab">Select</a></li>
Expand Down

0 comments on commit de87c16

Please sign in to comment.