mirror of
https://github.com/retspen/webvirtcloud
synced 2024-11-01 03:54:15 +00:00
65 lines
No EOL
3.3 KiB
HTML
65 lines
No EOL
3.3 KiB
HTML
{% load i18n %}
|
|
{% if request.user.is_superuser %}
|
|
<a href="#addFlavor" type="button" class="btn btn-success pull-right" data-toggle="modal">
|
|
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
|
|
</a>
|
|
|
|
<!-- Modal Flavor -->
|
|
<div class="modal fade" id="addFlavor" tabindex="-1" role="dialog" aria-labelledby="addFlavorLabel"
|
|
aria-hidden="true">
|
|
<div class="modal-dialog">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
|
<h4 class="modal-title">{% trans "Add New Flavor" %}</h4>
|
|
</div>
|
|
<div class="modal-body">
|
|
<form class="form-horizontal" method="post" role="form">{% csrf_token %}
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">{% trans "Name" %}</label>
|
|
|
|
<div class="col-sm-6">
|
|
<input type="text" name="label" class="form-control" placeholder="Micro" maxlength="20"
|
|
required pattern="[a-zA-Z0-9]+">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">{% trans "VCPU" %}</label>
|
|
|
|
<div class="col-sm-6">
|
|
<input type="text" class="form-control" name="vcpu" value="1" maxlength="1" required
|
|
pattern="[0-9]">
|
|
</div>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">{% trans "RAM" %}</label>
|
|
|
|
<div class="col-sm-6">
|
|
<input type="text" class="form-control" name="memory" value="512" maxlength="5" required
|
|
pattern="[0-9]+">
|
|
</div>
|
|
<label class="col-sm-1 control-label">{% trans "MB" %}</label>
|
|
</div>
|
|
<div class="form-group">
|
|
<label class="col-sm-3 control-label">{% trans "HDD" %}</label>
|
|
|
|
<div class="col-sm-6">
|
|
<input type="text" class="form-control" name="disk" value="10" maxlength="3" required
|
|
pattern="[0-9]+">
|
|
</div>
|
|
<label class="col-sm-1 control-label">{% trans "GB" %}</label>
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-dismiss="modal">
|
|
{% trans "Close" %}
|
|
</button>
|
|
<button type="submit" class="btn btn-primary" name="create_flavor">
|
|
{% trans "Add" %}
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div> <!-- /.modal-content -->
|
|
</div> <!-- /.modal-dialog -->
|
|
</div> <!-- /.modal -->
|
|
{% endif %} |