{% extends 'cruditor/form.html' %}
{% load i18n %}


{% block content %}
	{% if linked_objects %}
		<div class="alert alert-danger">{% trans "Unable to delete this item." %}</div>
		<div class="card mb-3">
			<div class="card-body">
			{% blocktrans trimmed %}
				<p>
					This item is currently referenced by other objects, and cannot be delete
					without jeopardising data integrity.
				</p>
				<p>
					To delete it successfully, first remove references from the following
					objects, then try again:
				</p>
			{% endblocktrans %}
			<ul>
				{% for obj in linked_objects %}
					<li>{{ obj }}</li>
				{% endfor %}
			</ul>
	{% else %}
		{{ block.super }}
	{% endif %}
{% endblock %}

{% block form %}
	<div class="card mb-3">
		<div class="card-body">
			<p class="mb-0">{% trans 'Are you sure you want to delete this item?' %}</p>
		</div>
	</div>
{% endblock %}
