Jan Dittberner
64e3f97330
- modify userdbs.models.UserDatabase.delete to perform deletion of database user if it has no other databases assigned - implement userdbs.views.DeleteUserDatabase - add URL pattern 'delete_userdatabase' to userdbs.urls - add template userdbs/userdatabase_confirm_delete.html - add link to 'delete_userdatabase' on hosting package detail page - add changelog entry
34 lines
1.7 KiB
HTML
34 lines
1.7 KiB
HTML
{% extends "userdbs/base.html" %}
|
|
{% load i18n %}
|
|
|
|
{% block title %}{{ block.super }} - {% spaceless %}
|
|
{% if user == customer %}
|
|
{% blocktrans with database=database.db_name %}Delete Database {{ database }}{% endblocktrans %}
|
|
{% else %}
|
|
{% blocktrans with database=database.db_name full_name=customer.get_full_name %}Delete Database {{ database }} of customer {{ full_name }}{% endblocktrans %}
|
|
{% endif %}
|
|
{% endspaceless %}{% endblock title %}
|
|
|
|
{% block page_title %}{% spaceless %}
|
|
{% if user == customer %}
|
|
{% blocktrans with database=database.db_name %}Delete Database <small>{{ database }}</small>{% endblocktrans %}
|
|
{% else %}
|
|
{% blocktrans with database=database.db_name full_name=customer.get_full_name %}Delete Database <small>{{ database }} of customer {{ full_name }}</small>{% endblocktrans %}
|
|
{% endif %}
|
|
{% endspaceless %}{% endblock page_title %}
|
|
|
|
{% block content %}
|
|
<div class="panel panel-warning">
|
|
<div class="panel-heading">
|
|
{% blocktrans with database=database.db_name %}Do you really want to delete the database {{ database }}?{% endblocktrans %}
|
|
</div>
|
|
<div class="panel-body form">
|
|
<p>{% blocktrans %}When you confirm the deletion the database will be removed from the database server. <strong>All data in the database will be lost!</strong> If the database user assigned to that database has no other databases assigned it will be deleted too.{% endblocktrans %}</p>
|
|
<form action="{% url 'delete_userdatabase' package=hostingpackage.id slug=database.db_name %}" method="post">
|
|
{% csrf_token %}
|
|
<input class="btn btn-warning" type="submit" value="{% trans "Yes, do it!" %}" />
|
|
<a class="btn btn-default" href="{{ hostingpackage.get_absolute_url }}">{% trans "Cancel" %}</a>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
{% endblock content %}
|