1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2024-11-01 12:04:15 +00:00
webvirtcloud/virtsecrets/templates/create_secret_block.html

61 lines
3.1 KiB
HTML
Raw Normal View History

2015-03-06 11:59:27 +00:00
{% load i18n %}
2015-03-03 09:34:09 +00:00
{% if request.user.is_superuser %}
<a href="#AddSecret" type="button" class="btn btn-success float-end" data-bs-toggle="modal">
<span class="fa fa-plus" aria-hidden="true"></span>
</a>
2015-03-06 11:59:27 +00:00
<!-- Modal Secret -->
<div class="modal fade" id="AddSecret" tabindex="-1" role="dialog" aria-labelledby="AddSecret" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title">{% trans "Create New Secret" %}</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<form method="post" action="" role="form" aria-label="Create Secret form">{% csrf_token %}
<div class="row">
<label class="col-sm-3 col-form-label">{% trans "Ephemeral" %}</label>
<div class="col-sm-6">
<select name="ephemeral" class="form-control">
<option value="no">{% trans "no" %}</option>
<option value="yes">{% trans "yes" %}</option>
</select>
2015-03-06 11:59:27 +00:00
</div>
</div>
<div class="row">
<label class="col-sm-3 col-form-label">{% trans "Private" %}</label>
<div class="col-sm-6">
<select name="private" class="form-control">
<option value="no">{% trans "no" %}</option>
<option value="yes">{% trans "yes" %}</option>
</select>
2015-03-06 11:59:27 +00:00
</div>
</div>
<div class="row">
<label class="col-sm-3 col-form-label">{% trans "Usage" %}</label>
<div class="col-sm-6">
<select name="usage_type" class="form-control">
{% for key, usage_type in secret_usage_types.items %}
<option value="{{ usage_type }}">{{ usage_type }}</option>
{% endfor %}
</select>
2015-03-06 11:59:27 +00:00
</div>
</div>
<div class="row">
<label class="col-sm-3 col-form-label">{% trans "Data" %}</label>
<div class="col-sm-6">
<input type="text" name="data" class="form-control" value="" required
pattern="[a-z0-9\. ]+" />
2015-03-06 11:59:27 +00:00
</div>
2015-03-06 13:06:29 +00:00
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">{% trans "Close" %}</button>
<button type="submit" class="btn btn-primary" name="create">{% trans "Create" %}</button>
</div>
</form>
</div> <!-- /.modal-content -->
</div> <!-- /.modal-dialog -->
</div><!-- /.modal -->
2015-03-03 09:34:09 +00:00
{% endif %}