1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-12-24 15:15:22 +00:00
webvirtcloud/instances/templates/create_inst_block.html

50 lines
2.6 KiB
HTML
Raw Normal View History

2015-03-06 13:06:29 +00:00
{% load i18n %}
2015-03-03 09:34:09 +00:00
{% if request.user.is_superuser %}
2020-05-19 16:53:54 +00:00
<a href="#AddInstance" type="button" class="btn btn-success btn-header float-right" data-toggle="modal">
<span class="fa fa-plus" aria-hidden="true"></span>
2015-03-06 13:06:29 +00:00
</a>
<!-- Modal pool -->
<div class="modal fade" id="AddInstance" tabindex="-1" role="dialog" aria-labelledby="AddNetPoolLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
2020-05-19 16:53:54 +00:00
<h5 class="modal-title">{% trans "Choose a compute for new instance" %}</h5>
2015-03-06 13:06:29 +00:00
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
</div>
<div class="modal-body">
2020-05-26 13:18:38 +00:00
<form method="post" aria-label="Select compute for instance create form"> {% csrf_token %}
2020-05-19 16:53:54 +00:00
<div class="form-group row">
<label class="col-sm-4 col-form-label">{% trans "Compute" %}</label>
2015-03-06 13:06:29 +00:00
<div class="col-sm-6">
2020-05-19 16:53:54 +00:00
<select class="custom-select" id="compute_select">
<option>{% trans "Please select" %}</option>
{% for compute in computes_data %}
<option {% if compute.status is not True %} class="font-italic text-muted" {% else %} value="{{ compute.id }}" {% endif %}>{{ compute.name }}</option>
{% empty %}
2015-05-15 17:54:55 +00:00
<option value="None">{% trans "None" %}</option>
2020-05-19 16:53:54 +00:00
{% endfor %}
2015-03-06 13:06:29 +00:00
</select>
</div>
</div>
</form>
</div>
<div class="modal-footer">
2020-05-19 16:53:54 +00:00
<button type="button" class="btn btn-secondary" data-dismiss="modal">
2015-03-06 13:06:29 +00:00
{% trans "Close" %}
</button>
2015-05-15 17:54:55 +00:00
{% if computes %}
2016-05-30 12:31:43 +00:00
<button type="submit" class="btn btn-primary" name="choose" onclick='goto_compute()'>
{% trans "Choose" %}
2015-05-15 17:54:55 +00:00
</button>
{% else %}
<button class="btn btn-primary disabled">
2016-05-30 12:31:43 +00:00
{% trans "Choose" %}
2015-05-15 17:54:55 +00:00
</button>
{% endif %}
2015-03-06 13:06:29 +00:00
</div>
</div> <!-- /.modal-content -->
</div> <!-- /.modal-dialog -->
</div> <!-- /.modal -->
2016-05-30 12:31:43 +00:00
{% endif %}