mirror of
https://github.com/retspen/webvirtcloud
synced 2024-12-27 00:25:22 +00:00
36 lines
No EOL
1.9 KiB
HTML
36 lines
No EOL
1.9 KiB
HTML
{% load i18n %}
|
|
{% if request.user.is_superuser %}
|
|
<a href="#addUserInst" type="button" class="btn btn-success btn-header float-right" data-toggle="modal">
|
|
<span class="fa fa-plus" aria-hidden="true"></span>
|
|
</a>
|
|
|
|
<!-- Modal pool -->
|
|
<div class="modal fade" id="addUserInst" tabindex="-1" role="dialog" aria-labelledby="addUserInstLabel" aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<h5 class="modal-title">{% trans "Add Instance for User" %}</h5>
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<form method="post" action="" role="form" aria-label="Add user instance form">{% csrf_token %}
|
|
<div class="form-group row">
|
|
<label class="col-sm-4 col-form-label">{% trans "Host" %} / {% trans "Instance" %}</label>
|
|
<div class="col-sm-6">
|
|
<select class="custom-select" name="inst_id">
|
|
{% for inst in instances %}
|
|
<option value="{{ inst.id }}">{{ inst.compute.name }} / {{ inst.name }}</option>
|
|
{% endfor %}
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-secondary" data-dismiss="modal">{% trans "Close" %}</button>
|
|
<button type="submit" class="btn btn-primary" name="add">{% trans "Add" %}</button>
|
|
</div>
|
|
</form>
|
|
</div> <!-- /.modal-content -->
|
|
</div> <!-- /.modal-dialog -->
|
|
</div> <!-- /.modal -->
|
|
{% endif %} |