1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-11-01 20:14:15 +00:00
webvirtcloud/storages/templates/create_stg_vol_block.html

64 lines
3.5 KiB
HTML
Raw Normal View History

2015-03-05 14:56:22 +00:00
{% load i18n %}
2020-07-13 09:33:09 +00:00
{% load bootstrap4 %}
2015-03-05 14:56:22 +00:00
{% if request.user.is_superuser %}
{% if state != 0 %}
{% if pool == "iso" %}
2020-05-19 16:53:54 +00:00
<a href="#IsoUpload" class="btn btn-success float-right" data-toggle="modal">
<span class="fa fa-plus" aria-hidden="true"></span>
2015-03-05 14:56:22 +00:00
</a>
<!-- Modal Upload -->
<div class="modal fade" id="IsoUpload" tabindex="-1" role="dialog" aria-labelledby="IsoUploadLabel" 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 "Upload ISO Image" %}</h5>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
2015-03-05 14:56:22 +00:00
</div>
<div class="modal-body">
2020-05-26 13:18:38 +00:00
<form enctype="multipart/form-data" method="post" role="form" aria-label="Upload iso form">{% csrf_token %}
2020-05-19 16:53:54 +00:00
<div class="form-group row">
<label class="col-sm-3 col-form-label">{% trans "Name" %}</label>
2015-03-05 14:56:22 +00:00
<div class="col-sm-6">
<input type="file" name="file" id="id_file">
</div>
</div>
</div>
<div class="modal-footer">
2020-05-19 16:53:54 +00:00
<button type="button" class="btn btn-secondary" data-dismiss="modal">{% trans "Close" %}</button>
2015-03-05 14:56:22 +00:00
<button type="submit" class="btn btn-primary" name="iso_upload">{% trans "Upload" %}</button>
</div>
</form>
</div> <!-- /.modal-content -->
</div> <!-- /.modal-dialog -->
</div> <!-- /.modal -->
{% else %}
2020-05-19 16:53:54 +00:00
<a href="#AddImage" class="btn btn-success float-right" data-toggle="modal">
<span class="fa fa-plus" aria-hidden="true"></span>
2015-03-05 14:56:22 +00:00
</a>
<!-- Modal Image -->
<div class="modal fade" id="AddImage" tabindex="-1" role="dialog" aria-labelledby="AddImageLabel" 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 "Add New Volume" %}</h5>
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
2015-03-05 14:56:22 +00:00
</div>
<div class="modal-body">
2020-07-13 09:33:09 +00:00
<form action="{% url 'create_volume' compute_id pool %}" id="create-volume" method="post" role="form" aria-label="Create volume to storage form">
{% csrf_token %}
{% bootstrap_form form layout='horizontal' %}
</form>
2015-03-05 14:56:22 +00:00
</div>
<div class="modal-footer">
2020-05-19 16:53:54 +00:00
<button type="button" class="btn btn-secondary" data-dismiss="modal">{% trans "Close" %}</button>
2020-07-13 09:33:09 +00:00
<button type="submit" form="create-volume" class="btn btn-primary">{% trans "Create" %}</button>
2015-03-05 14:56:22 +00:00
</div>
</div> <!-- /.modal-content -->
</div> <!-- /.modal-dialog -->
</div> <!-- /.modal -->
{% endif %}
{% endif %}
2015-03-05 14:56:22 +00:00
{% endif %}