2019-01-22 06:00:49 +00:00
|
|
|
{% load i18n %}
|
|
|
|
{% if request.user.is_superuser %}
|
2019-11-07 07:33:36 +00:00
|
|
|
<a href="#AddFixedNet4" type="button" class="btn btn-success pull-right" data-toggle="modal">
|
2019-01-22 06:00:49 +00:00
|
|
|
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
|
|
|
|
</a>
|
|
|
|
|
|
|
|
<!-- Modal pool -->
|
2019-11-07 07:33:36 +00:00
|
|
|
<div class="modal fade" id="AddFixedNet4" tabindex="-1" role="dialog" aria-labelledby="AddFixedNet4Label" aria-hidden="true">
|
2019-01-22 06:00:49 +00:00
|
|
|
<div class="modal-dialog">
|
|
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
2019-11-07 07:33:36 +00:00
|
|
|
<h4 class="modal-title">{% trans "Add IPv4 Fixed Address" %}</h4>
|
2019-01-22 06:00:49 +00:00
|
|
|
</div>
|
|
|
|
<form method="post" action="" role="form">{% csrf_token %}
|
|
|
|
<div class="modal-body">
|
|
|
|
<div class="row">
|
|
|
|
<div class="form-group">
|
|
|
|
<label class="col-sm-4 control-label">{% trans "Subnet Pool" %}</label>
|
|
|
|
<div class="col-sm-6">
|
|
|
|
<input type="text" readonly class="form-control" name="subnet" value="{{ ipv4_network }}" required pattern="[0-9\/\.]+">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2019-11-07 07:33:36 +00:00
|
|
|
<label class="col-sm-4 control-label">{% trans "MAC" %}</label>
|
2019-01-22 06:00:49 +00:00
|
|
|
<div class="col-sm-6">
|
2019-11-07 07:33:36 +00:00
|
|
|
<input type="text" class="form-control" name="mac" required pattern="[0-9\/\:]+">
|
2019-01-22 06:00:49 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2019-11-07 07:33:36 +00:00
|
|
|
<label class="col-sm-4 control-label">{% trans "Name" %}</label>
|
2019-01-22 06:00:49 +00:00
|
|
|
<div class="col-sm-6">
|
2019-11-07 07:33:36 +00:00
|
|
|
<input type="text" class="form-control" name="name" pattern="[a-zA-Z0-9_]+">
|
2019-01-22 06:00:49 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group">
|
2019-11-07 07:33:36 +00:00
|
|
|
<label class="col-sm-4 control-label">{% trans "Address" %}</label>
|
2019-01-22 06:00:49 +00:00
|
|
|
<div class="col-sm-6">
|
2019-11-07 07:33:36 +00:00
|
|
|
<input type="text" class="form-control" name="address" required pattern="[0-9\/\.]+">
|
2019-01-22 06:00:49 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
2019-11-07 07:33:36 +00:00
|
|
|
<input name="family" value="ipv4" hidden/>
|
2019-01-22 06:00:49 +00:00
|
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">{% trans "Close" %}</button>
|
|
|
|
<button type="submit" class="btn btn-primary" name="modify_fixed_address">{% trans "Create" %}</button>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</div> <!-- /.modal-content -->
|
|
|
|
</div> <!-- /.modal-dialog -->
|
|
|
|
</div> <!-- /.modal -->
|
|
|
|
{% endif %}
|