1
0
Fork 0
mirror of https://github.com/retspen/webvirtcloud synced 2025-02-15 08:55:19 +00:00
webvirtcloud/instances/templates/instances/destroy_instance_form.html
catborise 073b7b6717
Bootstrap5 (#17)
* Bootstrap5 migration
2021-07-07 14:12:38 +03:00

44 lines
No EOL
1.7 KiB
HTML

{% extends 'base.html' %}
{% load i18n %}
{% block title %}
{% trans "Confirm Destroy" %}
{% endblock title %}
{% block page_heading %}
{% trans "Destroy instance" %} {{ instance }}
{% endblock page_heading %}
{% block content %}
{% if request.user.is_superuser or userinstance.is_delete %}
{% if instance.status == 3 %}
<div class="alert alert-danger">
{% trans "Instance is suspended, cannot destroy!" %}
</div>
{% else %}
<div class="alert alert-danger">
{% trans "This action is irreversible!" %}
</div>
<form action="{% url 'instances:destroy' instance.id %}" class="form" method="post" role="form" id="delete_form">{% csrf_token %}
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" name="delete_disk" value="true" checked id="delete_disk">
<label class="form-check-label fw-bold" for="delete_disk">{% trans "Remove Instance's data" %}</label>
</div>
{% if instance.nvram %}
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" name="delete_nvram" value="true" id="delete_nvram" checked>
<label class="form-check-label fw-bold" for="delete_nvram">
{% trans "Remove Instance's NVRAM" %}
</label>
</div>
{% endif %}
<button type="submit" class="btn btn-lg btn-success float-end" name="delete">
{% trans "Destroy" %}
</button>
</form>
{% endif %}
{% else %}
<div class="alert alert-danger" role="alert">
{% trans "You cannot destroy instance!" %}
</div>
{% endif %}
{% endblock content %}